1
0
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:
NIIBE Yutaka 2018-09-07 13:01:52 +09:00
parent f0fdee2e24
commit 91f8a9b33a

View File

@ -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;
}