diff options
Diffstat (limited to '')
| -rw-r--r-- | gpgme/ChangeLog | 7 | ||||
| -rw-r--r-- | gpgme/trustlist.c | 7 | 
2 files changed, 12 insertions, 2 deletions
| diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog index 3c507006..78d2b460 100644 --- a/gpgme/ChangeLog +++ b/gpgme/ChangeLog @@ -1,5 +1,12 @@  2003-02-04  Marcus Brinkmann  <[email protected]> +	* 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 <[email protected]>. + +2003-02-04  Marcus Brinkmann  <[email protected]> +  	* rungpg.c (read_status): If he status handler returns an error,  	return it.  	(status_handler): If read_status fails, just return the error. diff --git a/gpgme/trustlist.c b/gpgme/trustlist.c index 8dbc9f58..0a6f635f 100644 --- a/gpgme/trustlist.c +++ b/gpgme/trustlist.c @@ -120,8 +120,10 @@ trustlist_colon_handler (GpgmeCtx ctx, char *line)  	  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;          }      } @@ -270,7 +272,8 @@ gpgme_trust_item_release (GpgmeTrustItem item)  {    if (!item)      return; -  free (item->name); +  if (item->name) +    free (item->name);    free (item);  } | 
