]> git.baikalelectronics.ru Git - kernel.git/commit
UDF: Close small mem leak in udf_find_entry()
authorJesper Juhl <jj@chaosbits.net>
Sun, 12 Dec 2010 22:18:15 +0000 (23:18 +0100)
committerJan Kara <jack@suse.cz>
Thu, 6 Jan 2011 16:53:53 +0000 (17:53 +0100)
commitc32b0be398392dfbf5c69bff8fd0249506266e94
tree51d24bb133431b9bc1effb1067436b6e786f2274
parent0f1691b9f369e090dcb7bb59575c5a7a17496c4e
UDF: Close small mem leak in udf_find_entry()

Hi,

There's a small memory leak in fs/udf/namei.c::udf_find_entry().

We dynamically allocate memory for 'fname' with kmalloc() and in most
situations we free it before we leave the function, but there is one
situation where we do not (but should). This patch closes the leak by
jumping to the 'out_ok' label which does the correct cleanup rather than
doing half the cleanup and returning directly.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/udf/namei.c