diff options
-rw-r--r-- | g10/ChangeLog | 7 | ||||
-rw-r--r-- | g10/revoke.c | 5 |
2 files changed, 11 insertions, 1 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog index be2ad0b0a..8ae574717 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,10 @@ +2011-09-20 Jim Meyering <meyering@redhat.com> + + avoid use of freed pointer + If we free pk2 at the top of the for-loop, set it to NULL + so that we don't free it again just before returning. + * revoke.c (gen_desig_revoke): Don't use pk2 after freeing it. + 2011-09-20 Werner Koch <wk@g10code.com> * sign.c (sign_file, clearsign_file, sign_symencrypt_file): diff --git a/g10/revoke.c b/g10/revoke.c index c18dfb989..2c696cc9c 100644 --- a/g10/revoke.c +++ b/g10/revoke.c @@ -263,7 +263,10 @@ gen_desig_revoke( const char *uname, strlist_t locusr ) SK_LIST list; if (pk2) - free_public_key (pk2); + { + free_public_key (pk2); + pk2 = NULL; + } if(sk_list) { |