[PATCH v2] drm: fix a memleak on mutex failure path

Daniel Vetter daniel at ffwll.ch
Tue May 5 00:27:14 PDT 2015


On Tue, Apr 28, 2015 at 10:25:46AM +0300, Jani Nikula wrote:
> On Mon, 27 Apr 2015, green at linuxhacker.ru wrote:
> > From: Oleg Drokin <green at linuxhacker.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
> >
> > In addition there is another failure path that leaks the same
> > ctx reference that is fixed.
> >
> > Found with smatch.
> >
> > Signed-off-by: Oleg Drokin <green at linuxhacker.ru>
> > CC: Daniel Vetter <daniel.vetter at ffwll.ch>
> 
> Reviewed-by: Jani Nikula <jani.nikula at intel.com>

Applied to topic/drm-misc, thanks.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list