diff options
author | NIIBE Yutaka <[email protected]> | 2018-09-07 04:01:52 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2018-09-07 04:01:52 +0000 |
commit | 7c96cc67e108f3a9514a4222ffac2f9f9a2ab19e (patch) | |
tree | 51f7ad9e874ed37917a071c7595df1f8b37f48c8 | |
parent | gpgscm: Suppress warnings for GCC > 6. (diff) | |
download | gnupg-7c96cc67e108f3a9514a4222ffac2f9f9a2ab19e.tar.gz gnupg-7c96cc67e108f3a9514a4222ffac2f9f9a2ab19e.zip |
g10: Fix memory leak.
* g10/import.c (read_block): Call free_packet to skip the packet.
--
Reported-by: Philippe Antoine
GnuPG-bug-id: 3916
Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r-- | g10/import.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/g10/import.c b/g10/import.c index 73f795cd9..dbf600079 100644 --- a/g10/import.c +++ b/g10/import.c @@ -924,6 +924,8 @@ read_block( IOBUF a, int with_meta, add_kbnode (root, new_kbnode (pkt)); pkt = xmalloc (sizeof *pkt); } + else + free_packet (pkt, &parsectx); init_packet(pkt); break; } |