aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-11-26 09:25:23 +0100
committerHarald Welte <laforge@gnumonks.org>2016-11-26 09:25:23 +0100
commitae3a993bd637b3994db0183abe8cfc6eeb796d51 (patch)
tree6c5034f23a13fb3578ba93c649e34673872523bc
parent35daa67763b53790edecd8329d4012b9b1ed436f (diff)
input/ipaccess.c: Check return value of osmo_fd_register()
Change-Id: I81659e0533ceb5d43292d97a63300b500044add7 Fixes: Coverity CID 57630
-rw-r--r--src/input/ipaccess.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index 1cb541e..35465e3 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -196,7 +196,12 @@ static int ipaccess_rcvmsg(struct e1inp_line *line, struct msgb *msg,
newbfd->priv_nr = E1INP_SIGN_RSL + unit_data.trx_id;
osmo_fd_unregister(bfd);
bfd->fd = -1;
- osmo_fd_register(newbfd);
+ ret = osmo_fd_register(newbfd);
+ if (ret < 0) {
+ LOGP(DLINP, LOGL_ERROR,
+ "could not register FD\n");
+ goto err;
+ }
/* now we can release the dummy RSL line. */
e1inp_line_put(line);
}