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>
This commit is contained in:
parent
62ec56524f
commit
43054412db
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue