diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-05-10 22:38:25 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-05-16 23:23:05 +0200 |
commit | 08a6fac1c63233c87eec129938022f1a9a4d51f6 (patch) | |
tree | 4fd7a2a906cf5ca0a42b3b8cb30351465f0f6cee /fs/compat.c | |
parent | [Patch] fs/binfmt_elf.c: fix a wrong free (diff) | |
download | linux-08a6fac1c63233c87eec129938022f1a9a4d51f6.tar.xz linux-08a6fac1c63233c87eec129938022f1a9a4d51f6.zip |
[PATCH] get rid of leak in compat_execve()
Even though copy_compat_strings() doesn't cache the pages,
copy_strings_kernel() and stuff indirectly called by e.g.
->load_binary() is doing that, so we need to drop the
cache contents in the end.
[found by WANG Cong <wangcong@zeuux.org>]
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/compat.c')
-rw-r--r-- | fs/compat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/compat.c b/fs/compat.c index 332a869d2c53..ed43e17a5dc6 100644 --- a/fs/compat.c +++ b/fs/compat.c @@ -1405,7 +1405,7 @@ int compat_do_execve(char * filename, /* execve success */ security_bprm_free(bprm); acct_update_integrals(current); - kfree(bprm); + free_bprm(bprm); return retval; } @@ -1424,7 +1424,7 @@ out_file: } out_kfree: - kfree(bprm); + free_bprm(bprm); out_ret: return retval; |