uev_timer_init(): Mark fd as uninitialized on error

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-11-14 12:17:41 +01:00
parent 853604a65a
commit 6cbeb057b8
+1
View File
@@ -83,6 +83,7 @@ int uev_timer_init(uev_ctx_t *ctx, uev_t *w, uev_cb_t *cb, void *arg, int timeou
_uev_watcher_stop(w);
exit:
close(fd);
w->fd = -1;
return -1;
}