diff options
author | William Henderson <william.henderson@nutanix.com> | 2023-07-31 15:32:52 +0000 |
---|---|---|
committer | John Levon <john.levon@nutanix.com> | 2023-09-15 13:06:15 +0100 |
commit | 9fe5da83438a3eae74b7d6b3e9930ec5d2e2eb84 (patch) | |
tree | b63359fd95caea95201636939407ecd2ccecd8e7 | |
parent | 50066ff2283f8dac98922fdc83970664c91dfe04 (diff) | |
download | libvfio-user-9fe5da83438a3eae74b7d6b3e9930ec5d2e2eb84.zip libvfio-user-9fe5da83438a3eae74b7d6b3e9930ec5d2e2eb84.tar.gz libvfio-user-9fe5da83438a3eae74b7d6b3e9930ec5d2e2eb84.tar.bz2 |
test: fix memory leak in unit tests
Signed-off-by: William Henderson <william.henderson@nutanix.com>
-rw-r--r-- | test/unit-tests.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/unit-tests.c b/test/unit-tests.c index 7f3e924..a652bc2 100644 --- a/test/unit-tests.c +++ b/test/unit-tests.c @@ -518,6 +518,12 @@ static int teardown_test_setup_migration(void **state) { struct test_setup_migr_reg_dat *p = *state; vfu_destroy_ctx(p->v); + + if (LAST_WRITE != NULL) { + free(LAST_WRITE); + LAST_WRITE = NULL; + } + return 0; } |