aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-12-15 14:06:09 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-12-15 14:06:09 +0000
commit5106937c7b24933bb1f906f672606147c4bac1cb (patch)
treee55287ef21b39486358b3aa532bd67aaabfafb41
parentPKGBUILD/meson: bump version to 1.0.0 (diff)
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.
-rw-r--r--fdm.c1
1 files changed, 1 insertions, 0 deletions
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;
}