]> git.baikalelectronics.ru Git - kernel.git/commit
agp: correct missing cleanup on error in agp_add_bridge
authorKevin Winchester <kjwinchester@gmail.com>
Tue, 17 Nov 2009 22:38:45 +0000 (14:38 -0800)
committerDave Airlie <airlied@redhat.com>
Mon, 11 Jan 2010 05:09:01 +0000 (15:09 +1000)
commitc3eba70d493542c3b5a3ddecb6461978eb162436
treef7a5dbfd36457cb77450d9668768a5cc09bc3d0d
parenta3bd51081385ae70b27b40b645963b715a972743
agp: correct missing cleanup on error in agp_add_bridge

While investigating a kmemleak detected leak, I encountered the
agp_add_bridge function.  It appears to be responsible for freeing
the agp_bridge_data in the case of a failure, but it is only doing
so for some errors.

Fix it to always free the bridge data if a failure condition is
encountered.

Signed-off-by: Kevin Winchester <kjwinchester@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/char/agp/backend.c