mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-01 16:33:02 +01:00
g10: Fix a memory leak.
* g10/import.c (import): Care PNDING_PKT on error. -- GnuPG-bug-id: 4461 Reported-by: Philippe Antoine Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
b6f0b0efa1
commit
a861f9343d
@ -689,6 +689,13 @@ import (ctrl_t ctrl, IOBUF inp, const char* fname,struct import_stats_s *stats,
|
||||
log_error (_("error reading '%s': %s\n"), fname, gpg_strerror (rc));
|
||||
|
||||
release_kbnode (secattic);
|
||||
|
||||
/* When read_block loop was stopped by error, we have PENDING_PKT left. */
|
||||
if (pending_pkt)
|
||||
{
|
||||
free_packet (pending_pkt, NULL);
|
||||
xfree (pending_pkt);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user