dexter submitted this change.
e1d: close fd when osmo_fd_setup fails
When osmo_fd_register() fails we just exit but the file descriptor stays
open. A file descriptor in this state does not work. Let's close the file
descriptor
Change-Id: I6b41e5ad8511f2d4e524979631a91ab23dc0b23f
---
M src/input/e1d.c
1 file changed, 15 insertions(+), 0 deletions(-)
diff --git a/src/input/e1d.c b/src/input/e1d.c
index f95d493..44a710d 100644
--- a/src/input/e1d.c
+++ b/src/input/e1d.c
@@ -509,6 +509,8 @@
if (ret < 0) {
LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "could not register FD: %s\n", strerror(ret));
talloc_free(ts_info);
+ close(bfd->fd);
+ bfd->fd = -1;
return ret;
}
}
To view, visit change 32370. To unsubscribe, or for help writing mail filters, visit settings.