mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02: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
2 changed files with 11 additions and 1 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue