提交 f0ee9aab 编写于 作者: D Davide Libenzi 提交者: Linus Torvalds

epoll: move kfree inside ep_free

Move the kfree() call inside the ep_free() function.
Signed-off-by: NDavide Libenzi <davidel@xmailserver.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 67647d0f
......@@ -469,18 +469,16 @@ static void ep_free(struct eventpoll *ep)
}
mutex_unlock(&epmutex);
mutex_destroy(&ep->mtx);
kfree(ep);
}
static int ep_eventpoll_release(struct inode *inode, struct file *file)
{
struct eventpoll *ep = file->private_data;
if (ep) {
if (ep)
ep_free(ep);
kfree(ep);
}
DNPRINTK(3, (KERN_INFO "[%p] eventpoll: close() ep=%p\n", current, ep));
return 0;
......@@ -1107,7 +1105,6 @@ asmlinkage long sys_epoll_create(int size)
error_free:
ep_free(ep);
kfree(ep);
error_return:
DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_create(%d) = %d\n",
current, size, error));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册