X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/blobdiff_plain/42bcfe2cae29f375af4cf2cd3ccfa196b77a3946..8e454e9e224e84113a93ad22103613be4ff72b3f:/keydb_file.c?ds=inline diff --git a/keydb_file.c b/keydb_file.c index 4c1a6a3..a132ea7 100644 --- a/keydb_file.c +++ b/keydb_file.c @@ -88,6 +88,8 @@ int fetch_key(uint64_t keyid, struct openpgp_publickey **publickey, if (fd > -1) { read_openpgp_stream(file_fetchchar, &fd, &packets); parse_keys(packets, publickey); + free_packet_list(packets); + packets = NULL; close(fd); } @@ -125,6 +127,8 @@ int store_key(struct openpgp_publickey *publickey, bool intrans, bool update) write_openpgp_stream(file_putchar, &fd, packets); close(fd); + free_packet_list(packets); + packets = NULL; } return (fd > -1);