[PATCH] Fix segfault when there's no config dir

Jeremy Huddleston jeremyhu at apple.com
Fri Nov 25 15:24:56 PST 2011


Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>

On Nov 25, 2011, at 10:38, przanoni at gmail.com wrote:

> From: Paulo Zanoni <paulo.r.zanoni at intel.com>
> 
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
> ---
> hw/xfree86/parser/scan.c |    4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
> 
> Sorry. I guess this should be pushed soon...
> 
> diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
> index 9b6c356..31c6499 100644
> --- a/hw/xfree86/parser/scan.c
> +++ b/hw/xfree86/parser/scan.c
> @@ -855,8 +855,8 @@ OpenConfigDir(const char *path, const char *cmdline, const char *projroot,
> 			free(dirpath);
> 			dirpath = NULL;
> 		}
> -		while (num--)
> -			free(list[num]);
> +		while (num > 0)
> +			free(list[--num]);
> 		free(list);
> 	}
> 
> -- 
> 1.7.7.1
> 
> _______________________________________________
> 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