dexter has uploaded this change for review.
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(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/70/32370/1
diff --git a/src/input/e1d.c b/src/input/e1d.c
index 1296b52..b91d02e 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 = 0;
return ret;
}
}
To view, visit change 32370. To unsubscribe, or for help writing mail filters, visit settings.