diff options
author | Daiki Ueno <dueno@redhat.com> | 2016-09-20 16:48:16 +0200 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2016-10-31 15:24:17 +0100 |
commit | bc6469c4fd576c698bab9c8b620de00d7ba1fe1a (patch) | |
tree | 16d17581de0f4f7ea789e91e193ae0119242b618 | |
parent | ecaf79c6a0b35e55b27f465c6d6628f165874b78 (diff) |
test: Fix memleak in test-token cleanup
GCC's asan spotted this:
Direct leak of 338 byte(s) in 13 object(s) allocated from:
#0 0x7f54f03fee20 in malloc (/lib64/libasan.so.3+0xc6e20)
#1 0x445e8c in p11_path_build ../common/path.c:222
#2 0x4385bd in expand_tempdir ../common/test.c:334
#3 0x43869c in p11_test_directory ../common/test.c:361
#4 0x4033e3 in setup_temp ../trust/test-token.c:79
-rw-r--r-- | trust/test-token.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/trust/test-token.c b/trust/test-token.c index d4c89ce..d557980 100644 --- a/trust/test-token.c +++ b/trust/test-token.c @@ -84,7 +84,6 @@ static void teardown (void *path) { p11_token_free (test.token); - memset (&test, 0, sizeof (test)); } static void @@ -93,6 +92,7 @@ teardown_temp (void *unused) p11_test_directory_delete (test.directory); teardown (test.directory); free (test.directory); + memset (&test, 0, sizeof (test)); } static void |