mirror of
git://git.gnupg.org/gnupg.git
synced 2024-05-30 22:08:02 +02:00
g10: Fix memory leak.
* g10/import.c (read_block): Call free_packet to skip the packet.
--
Cherry-pick of master commit of:
7c96cc67e1
Reported-by: Philippe Antoine
GnuPG-bug-id: 3916
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
f0fdee2e24
commit
91f8a9b33a
|
@ -924,6 +924,8 @@ read_block( IOBUF a, int with_meta,
|
||||||
add_kbnode (root, new_kbnode (pkt));
|
add_kbnode (root, new_kbnode (pkt));
|
||||||
pkt = xmalloc (sizeof *pkt);
|
pkt = xmalloc (sizeof *pkt);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
free_packet (pkt, &parsectx);
|
||||||
init_packet(pkt);
|
init_packet(pkt);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user