diff options
Diffstat (limited to 'fs/eventpoll.c')
-rw-r--r-- | fs/eventpoll.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c index d4255be29bc6..0b73cd45a06d 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c | |||
@@ -469,18 +469,16 @@ static void ep_free(struct eventpoll *ep) | |||
469 | } | 469 | } |
470 | 470 | ||
471 | mutex_unlock(&epmutex); | 471 | mutex_unlock(&epmutex); |
472 | |||
473 | mutex_destroy(&ep->mtx); | 472 | mutex_destroy(&ep->mtx); |
473 | kfree(ep); | ||
474 | } | 474 | } |
475 | 475 | ||
476 | static int ep_eventpoll_release(struct inode *inode, struct file *file) | 476 | static int ep_eventpoll_release(struct inode *inode, struct file *file) |
477 | { | 477 | { |
478 | struct eventpoll *ep = file->private_data; | 478 | struct eventpoll *ep = file->private_data; |
479 | 479 | ||
480 | if (ep) { | 480 | if (ep) |
481 | ep_free(ep); | 481 | ep_free(ep); |
482 | kfree(ep); | ||
483 | } | ||
484 | 482 | ||
485 | DNPRINTK(3, (KERN_INFO "[%p] eventpoll: close() ep=%p\n", current, ep)); | 483 | DNPRINTK(3, (KERN_INFO "[%p] eventpoll: close() ep=%p\n", current, ep)); |
486 | return 0; | 484 | return 0; |
@@ -1107,7 +1105,6 @@ asmlinkage long sys_epoll_create(int size) | |||
1107 | 1105 | ||
1108 | error_free: | 1106 | error_free: |
1109 | ep_free(ep); | 1107 | ep_free(ep); |
1110 | kfree(ep); | ||
1111 | error_return: | 1108 | error_return: |
1112 | DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_create(%d) = %d\n", | 1109 | DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_create(%d) = %d\n", |
1113 | current, size, error)); | 1110 | current, size, error)); |