Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

epoll: move kfree inside ep_free

Move the kfree() call inside the ep_free() function.

Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Davide Libenzi and committed by
Linus Torvalds
f0ee9aab 67647d0f

+2 -5
+2 -5
fs/eventpoll.c
··· 469 469 } 470 470 471 471 mutex_unlock(&epmutex); 472 - 473 472 mutex_destroy(&ep->mtx); 473 + kfree(ep); 474 474 } 475 475 476 476 static int ep_eventpoll_release(struct inode *inode, struct file *file) 477 477 { 478 478 struct eventpoll *ep = file->private_data; 479 479 480 - if (ep) { 480 + if (ep) 481 481 ep_free(ep); 482 - kfree(ep); 483 - } 484 482 485 483 DNPRINTK(3, (KERN_INFO "[%p] eventpoll: close() ep=%p\n", current, ep)); 486 484 return 0; ··· 1105 1107 1106 1108 error_free: 1107 1109 ep_free(ep); 1108 - kfree(ep); 1109 1110 error_return: 1110 1111 DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_create(%d) = %d\n", 1111 1112 current, size, error));