* trustlist.c (trustlist_colon_handler): Release ITEM if name
could not be allocated.
(gpgme_trust_item_release): Only release name if it is allocated.
Reported by Marc Mutz <Marc.Mutz@uni-bielefeld.de>.
+2003-02-04 Marcus Brinkmann <marcus@g10code.de>
+
+ * trustlist.c (trustlist_colon_handler): Release ITEM if name
+ could not be allocated.
+ (gpgme_trust_item_release): Only release name if it is allocated.
+ Reported by Marc Mutz <Marc.Mutz@uni-bielefeld.de>.
+
2003-02-04 Marcus Brinkmann <marcus@g10code.de>
* rungpg.c (read_status): If he status handler returns an error,
break;
case 9: /* user ID */
item->name = strdup (p);
- if (!item->name)
+ if (!item->name) {
+ gpgme_trust_item_release (item);
return GPGME_Out_Of_Core;
+ }
break;
}
}
{
if (!item)
return;
- free (item->name);
+ if (item->name)
+ free (item->name);
free (item);
}