mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-21 19:48:05 +01:00
g10: Fix memory leak.
* g10/import.c (read_block): Call free_packet to skip the packet. -- Cherry-pick of master commit of: 7c96cc67e108f3a9514a4222ffac2f9f9a2ab19e 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…
x
Reference in New Issue
Block a user