[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <B7EF1F38-A474-4E07-95A6-252787D21A06@linuxhacker.ru>
Date: Mon, 27 Apr 2015 11:36:33 -0400
From: Oleg Drokin <green@...uxhacker.ru>
To: Jani Nikula <jani.nikula@...ux.intel.com>
Cc: David Airlie <airlied@...ux.ie>, dri-devel@...ts.freedesktop.org,
Daniel Vetter <daniel.vetter@...ll.ch>,
"<kernel-janitors@...r.kernel.org>" <kernel-janitors@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] drm: fix a memleak on mutex failure path
Hello!
On Apr 27, 2015, at 4:56 AM, Jani Nikula wrote:
> On Sun, 26 Apr 2015, green@...uxhacker.ru wrote:
>> From: Oleg Drokin <green@...uxhacker.ru>
>>
>> Need to free just allocated ctx allocation if we cannot
>> get our config mutex.
>>
>> This one has been flagged by kbuild bot all the way back in August,
>> but somehow nobody picked it up:
>> https://lists.01.org/pipermail/kbuild/2014-August/001691.html
>>
>> Found with smatch.
>>
>> Signed-off-by: Oleg Drokin <green@...uxhacker.ru>
>> CC: Daniel Vetter <daniel.vetter@...ll.ch>
>
> The function has another leaking failure path, would be nice to have
> that fixed too. Maybe with a common out label.
Hm, you are right, there's another path, though it's less obvious since
what is done with ctx inside of those other calls, but apparently nothing
if there is an error, so it's also a leak.
I'll do an updated patch in a moment.
Bye,
Oleg
--
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