[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <54787654.7020304@suse.cz>
Date: Fri, 28 Nov 2014 14:19:16 +0100
From: Michal Marek <mmarek@...e.cz>
To: Eddie Kovsky <ewk@...ovsky.org>
CC: "Yann E. MORIN" <yann.morin.1998@...e.fr>,
linux-kbuild@...r.kernel.org, trivial@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kconfig: Fix compiler warning
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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists