Re: [PATCH] kconfig: Fix compiler warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2014-11-20 06:44, Eddie Kovsky wrote:
> diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
> index a26cc5d2a9b0..a728d23949e7 100644
> --- a/scripts/kconfig/menu.c
> +++ b/scripts/kconfig/menu.c
> @@ -559,8 +559,8 @@ static void get_prompt_str(struct gstr *r, struct property *prop,
>  		if (location == NULL && accessible)
>  			location = menu;
>  	}
> +	jump = xmalloc(sizeof(*jump));
>  	if (head && location) {
> -		jump = xmalloc(sizeof(struct jump_key));

This creates a memory leak, because 'jump' is allocated, but not added
to the list, if the following condition is not met.

Michal

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux