X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/blobdiff_plain/0f9e9f98538575cf98f55699962d605caa9567f0..34b03028378025ad22c8d29f70e81109cee690c2:/keydb_file.c 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);