diff options
| author | 2010-10-27 09:28:24 -0400 | |
|---|---|---|
| committer | 2012-02-05 10:32:44 +0100 | |
| commit | ea4acf08bc71872215be84deabfb42b9133660ab (patch) | |
| tree | d564bacaeb5465955409b3b21bb364d08cc19ba2 | |
| parent | retry raw1394_read/write/lock/lock64 with delays after ack-busy (diff) | |
Reset device fd upon error condition in handle_inotify()
If an error is encountered while adding a new device in inotify
handling, make sure the fd is marked invalid (-1).
Signed-off-by: Peter Hurley <phurley@charter.net>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| -rw-r--r-- | src/fw.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -426,6 +426,7 @@ handle_inotify(raw1394handle_t handle, struct epoll_closure *ec, ep.data.ptr = &fwhandle->devices[i].closure; if (epoll_ctl(fwhandle->epoll_fd, EPOLL_CTL_ADD, fd, &ep) < 0) { close(fd); + fwhandle->devices[i].fd = -1; return -1; } |
