]> git.proxmox.com Git - mirror_qemu.git/commit
event_notifier: avoid dandling file descriptor in event_notifier_cleanup
authorFrediano Ziglio <fziglio@redhat.com>
Wed, 23 Oct 2019 12:26:51 +0000 (13:26 +0100)
committerLaurent Vivier <laurent@vivier.eu>
Thu, 24 Oct 2019 17:26:52 +0000 (19:26 +0200)
commit105e1023a855dd13fc15a8253fe6476f443e48aa
tree681765e17ec54ddde989b32dead552413b1820ad
parent765e35d71f37325a2bc41b915c7658ac7598ce5f
event_notifier: avoid dandling file descriptor in event_notifier_cleanup

If rfd is equal to wfd the file descriptor is closed but
rfd will still have the closed value.
The EventNotifier structure should not be used again after calling
event_notifier_cleanup or should be initialized again but make
sure to not have dandling file descriptors around.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20191023122652.2999-2-fziglio@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
util/event_notifier-posix.c