summaryrefslogtreecommitdiffstats
path: root/g10/skclist.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2011-09-20 19:24:52 +0200
committerWerner Koch <wk@gnupg.org>2011-09-20 19:24:52 +0200
commit6cf8890dc1f551a1e87ed8b8e67a733e95b1bb6d (patch)
treea4485063c34975876ad80d0898af16379d095bc3 /g10/skclist.c
parenttests: avoid use of freed pointer (diff)
downloadgnupg2-6cf8890dc1f551a1e87ed8b8e67a733e95b1bb6d.tar.xz
gnupg2-6cf8890dc1f551a1e87ed8b8e67a733e95b1bb6d.zip
Allow NULL for free_public_key.
Diffstat (limited to 'g10/skclist.c')
-rw-r--r--g10/skclist.c3
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);
}
}