[PATCH 4/6] xfree86: Fix leaks in OpenConfigFile and OpenConfigDir

Mark Kettenis mark.kettenis at xs4all.nl
Wed Aug 4 01:04:19 PDT 2010


> From: Jesse Adkins <jesserayadkins at gmail.com>
> Date: Tue,  3 Aug 2010 18:21:31 -0700

This still has the indentation messed up.

> Signed-off-by: Jesse Adkins <jesserayadkins at gmail.com>
> ---
>  hw/xfree86/parser/scan.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
> index 5312143..fecde19 100644
> --- a/hw/xfree86/parser/scan.c
> +++ b/hw/xfree86/parser/scan.c
> @@ -819,6 +819,7 @@ OpenConfigFile(const char *path, const char *cmdline, const char *projroot,
>  		}
>  	}
>  
> +    free(pathcopy);
>  	if (file) {
>  		configFiles[numFiles].file = file;
>  		configFiles[numFiles].path = strdup(filepath);
> @@ -927,6 +928,7 @@ OpenConfigDir(const char *path, const char *cmdline, const char *projroot,
>  		}
>  	}
>  
> +    free(pathcopy)
>  	return dirpath;
>  }
>  
> -- 
> 1.7.0.4
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
> 


More information about the xorg-devel mailing list