test: don't leave global pointing to stack memory (#735)
test_device_is_stopped_and_copying points the global
vfu_ctx structure to a local stack-allocated data
structure. This is fine while the function is
executing, but newer gcc complains that the
pointer is left there after it returns.
So clear the pointer to NULL before returning.
Fixes issue #734.
Reported-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
diff --git a/test/unit-tests.c b/test/unit-tests.c
index 26ad304..0fd4fe7 100644
--- a/test/unit-tests.c
+++ b/test/unit-tests.c
@@ -601,6 +601,7 @@
assert_false(r);
}
}
+ vfu_ctx.migration = NULL;
}
static void