* in and then parse_keys() to parse the packets into a publickey
* structure.
*/
-int fetch_key(uint64_t keyid, struct openpgp_publickey **publickey, bool intrans)
+int fetch_key(uint64_t keyid, struct openpgp_publickey **publickey,
+ bool intrans)
{
struct openpgp_packet_list *packets = NULL;
PGresult *result = NULL;
&packets);
parse_keys(packets, publickey);
lo_close(dbconn, fd);
+ free_packet_list(packets);
+ packets = NULL;
}
}
} else if (PQresultStatus(result) != PGRES_TUPLES_OK) {
&packets);
parse_keys(packets, publickey);
lo_close(dbconn, fd);
+ free_packet_list(packets);
+ packets = NULL;
}
}
} else if (PQresultStatus(result) != PGRES_TUPLES_OK) {
write_openpgp_stream(keydb_putchar, &fd, packets);
lo_close(dbconn, fd);
}
+ free_packet_list(packets);
+ packets = NULL;
snprintf(statement, 1023,
"INSERT INTO onak_keys (keyid, keydata) VALUES "