mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
avoid use of freed pointer
Without this patch, pk2 would be freed twice. >From 2a18a4b757e0896e738fefbbaa8ff8c23a9edf89 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering@redhat.com> Date: Tue, 20 Sep 2011 16:20:39 +0200 Subject: [PATCH] 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.
This commit is contained in:
parent
7c000f18de
commit
b8b4d5c9e5
@ -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):
|
||||
|
@ -263,7 +263,10 @@ gen_desig_revoke( const char *uname, strlist_t locusr )
|
||||
SK_LIST list;
|
||||
|
||||
if (pk2)
|
||||
{
|
||||
free_public_key (pk2);
|
||||
pk2 = NULL;
|
||||
}
|
||||
|
||||
if(sk_list)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user