Skip to content

Commit

Permalink
test: fix memory leak in unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: William Henderson <william.henderson@nutanix.com>
  • Loading branch information
w-henderson committed Jul 31, 2023
1 parent 89adade commit 6c62dae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/unit-tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 6c62dae

Please sign in to comment.