diff options
author | Werner Koch <wk@gnupg.org> | 2011-09-20 19:24:52 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2011-09-20 19:24:52 +0200 |
commit | 6cf8890dc1f551a1e87ed8b8e67a733e95b1bb6d (patch) | |
tree | a4485063c34975876ad80d0898af16379d095bc3 /g10/skclist.c | |
parent | tests: avoid use of freed pointer (diff) | |
download | gnupg2-6cf8890dc1f551a1e87ed8b8e67a733e95b1bb6d.tar.xz gnupg2-6cf8890dc1f551a1e87ed8b8e67a733e95b1bb6d.zip |
Allow NULL for free_public_key.
Diffstat (limited to 'g10/skclist.c')
-rw-r--r-- | g10/skclist.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/g10/skclist.c b/g10/skclist.c index 912104ef5..5a3ea9503 100644 --- a/g10/skclist.c +++ b/g10/skclist.c @@ -51,8 +51,7 @@ release_sk_list (SK_LIST sk_list) for (; sk_list; sk_list = sk_rover) { sk_rover = sk_list->next; - if (sk_list->pk) - free_public_key (sk_list->pk); + free_public_key (sk_list->pk); xfree (sk_list); } } |