]> git.karo-electronics.de Git - karo-tx-linux.git/commit
inotify: dont skip removal of watch descriptor if creation of ignored event failed
authorLino Sanfilippo <LinoSanfilippo@gmx.de>
Sat, 24 Mar 2012 22:44:19 +0000 (23:44 +0100)
committerEric Paris <eparis@redhat.com>
Mon, 26 Mar 2012 17:06:15 +0000 (13:06 -0400)
commitb8ce6165698c66c83691767a2eacd4a5ac8d30b1
tree5567de5fab74d59fbf0939cb28b8fae8fc6d4f19
parent7bd17645e7774d63b0f6d9f341d1d2f94d6dad6e
inotify: dont skip removal of watch descriptor if creation of ignored event failed

In inotify_ignored_and_remove_idr() the removal of a watch descriptor is skipped
if the allocation of an ignored event failed and we are leaking memory (the
watch descriptor and the mark linked to it).
This patch ensures that the watch descriptor is removed regardless of whether
event creation failed or not.

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Eric Paris <eparis@redhat.com>
fs/notify/inotify/inotify_user.c