提交 43054412 编写于 作者: A Adrian Bunk 提交者: Linus Torvalds

lguest_user.c: fix memory leak

This patch fixes a memory leak spotted by the Coverity checker.
Signed-off-by: NAdrian Bunk <bunk@kernel.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 62ec5652
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册