dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/32370 ) Change subject: e1d: close fd when osmo_fd_setup fails ...................................................................... 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 https://gerrit.osmocom.org/c/libosmo-abis/+/32370 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I6b41e5ad8511f2d4e524979631a91ab23dc0b23f Gerrit-Change-Number: 32370 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier@sysmocom.de> Gerrit-MessageType: newchange