diff options
author | Adrian Bunk <bunk@kernel.org> | 2007-11-15 01:59:00 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-15 03:45:38 +0100 |
commit | 43054412db5e5b3eda1eff6c2245ff4257560340 (patch) | |
tree | c83ae671369ba540e6ead43aa8d750c07db016bd /drivers/lguest/lguest_user.c | |
parent | LXFB: use the correct MSR number for panel support (diff) | |
download | linux-43054412db5e5b3eda1eff6c2245ff4257560340.tar.xz linux-43054412db5e5b3eda1eff6c2245ff4257560340.zip |
lguest_user.c: fix memory leak
This patch fixes a memory leak spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/lguest/lguest_user.c')
-rw-r--r-- | drivers/lguest/lguest_user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/lguest/lguest_user.c b/drivers/lguest/lguest_user.c index 9d716fa42cad..3b92a61ba8d2 100644 --- a/drivers/lguest/lguest_user.c +++ b/drivers/lguest/lguest_user.c @@ -184,7 +184,7 @@ static int initialize(struct file *file, const unsigned long __user *input) free_regs: free_page(lg->regs_page); release_guest: - memset(lg, 0, sizeof(*lg)); + kfree(lg); unlock: mutex_unlock(&lguest_lock); return err; |