X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=mem.c;h=47f296744d3e1c25e93c8cafd5aeaed913d03297;hb=0d2a5aeeb4120999afc79d06619d90e26e2fec5c;hp=5ba9090b08cd52b507b9cb77ca02865004481071;hpb=8b4052ad6015aa9f54c9c824f28655f230d09d8d;p=onak.git diff --git a/mem.c b/mem.c index 5ba9090..47f2967 100644 --- a/mem.c +++ b/mem.c @@ -100,8 +100,6 @@ void free_packet(struct openpgp_packet *packet) { void free_packet_list(struct openpgp_packet_list *packet_list) { struct openpgp_packet_list *nextpacket = NULL; - log_assert(packet_list != NULL); - while (packet_list != NULL) { nextpacket = packet_list->next; if (packet_list->packet != NULL) { @@ -123,8 +121,6 @@ void free_signedpacket_list( struct openpgp_signedpacket_list *signedpacket_list) { struct openpgp_signedpacket_list *nextpacket = NULL; - log_assert(signedpacket_list != NULL); - while (signedpacket_list != NULL) { nextpacket = signedpacket_list->next; if (signedpacket_list->packet != NULL) { @@ -148,17 +144,15 @@ void free_signedpacket_list( void free_publickey(struct openpgp_publickey *key) { struct openpgp_publickey *nextkey = NULL; - log_assert(key != NULL); - while (key != NULL) { nextkey = key->next; if (key->publickey != NULL) { free_packet(key->publickey); key->publickey = NULL; } - if (key->revocations != NULL) { - free_packet_list(key->revocations); - key->revocations = NULL; + if (key->sigs != NULL) { + free_packet_list(key->sigs); + key->sigs = NULL; } if (key->uids != NULL) { free_signedpacket_list(key->uids);