X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=keydb_file.c;h=a132ea73c833d679aec4083da3d71ffdbfe1140e;hb=34b03028378025ad22c8d29f70e81109cee690c2;hp=4c1a6a384b199018b37b80c9ef12b0f019b31a70;hpb=0f9e9f98538575cf98f55699962d605caa9567f0;p=onak.git 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);