From 5106937c7b24933bb1f906f672606147c4bac1cb Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 15 Dec 2019 15:06:09 +0100 Subject: fdm: close fd even if we didn't find it in our list This behavior is debatable, but helps in error handling where we're removing a bunch of descriptors where not all of them have been added to the FDM yet. --- fdm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fdm.c b/fdm.c index a7bb6b36..4592a9e8 100644 --- a/fdm.c +++ b/fdm.c @@ -130,6 +130,7 @@ fdm_del_internal(struct fdm *fdm, int fd, bool close_fd) } LOG_ERR("no such FD: %d", fd); + close(fd); return false; } -- cgit v1.3