[PATCH] Fix memory leak in stdlib/isomac.c

Andreas Jaeger aj@suse.com
Mon Sep 9 12:17:00 GMT 2013


On 09/09/2013 02:11 PM, Allan McRae wrote:
> ---
> 
> 2013-09-09  Allan McRae  <allan@archlinux.org>
> 
> 	[BZ #15893]
> 	* stdlib/isomac.c (get_null_defines): Fix memory leak.


Thanks, fine,

Andreas

>  stdlib/isomac.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/stdlib/isomac.c b/stdlib/isomac.c
> index 2c9009b..621b515 100644
> --- a/stdlib/isomac.c
> +++ b/stdlib/isomac.c
> @@ -263,6 +263,7 @@ get_null_defines (void)
>    if (system (command))
>      {
>        puts ("system() returned nonzero");
> +      free (command);
>        return NULL;
>      }
>    free (command);
> 


-- 
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126



More information about the Libc-alpha mailing list