aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-08-30 11:04:49 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-08-30 11:16:38 +0200
commit9ba55a7925c4b6544c5b171c67d4d9055a0e084c (patch)
treeb18e52fe6cb26bf5d569ffb0f3079bcd0d344097
parent730f851e3fe66b4b46ecfc3ba218a3c0b2af8836 (diff)
ipa: Fix a memory leak when the RSL/OML is dropped 'early'historic/on-waves/bsc-master
In case the BTS didn't get identified there will be a leaked e1inp_line. Free the e1inp_line when the OML and RSL link is dropped. This has been tested with: b connect: 'localhost'. b waitForBTSReady. b stop. and: oml-rsl-connect-close/OMLRSLConnectClose.st
-rw-r--r--openbsc/src/input/ipaccess.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/openbsc/src/input/ipaccess.c b/openbsc/src/input/ipaccess.c
index 96916cfb4..d8523b543 100644
--- a/openbsc/src/input/ipaccess.c
+++ b/openbsc/src/input/ipaccess.c
@@ -403,10 +403,12 @@ static int ipaccess_drop(struct e1inp_ts *ts, struct osmo_fd *bfd)
}
/* error case */
- LOGP(DINP, LOGL_ERROR, "Failed to find a signalling link for ts: %p\n", ts);
+ LOGP(DINP, LOGL_ERROR,
+ "Failed to find a signalling link for ts: %p %p\n", ts);
osmo_fd_unregister(bfd);
close(bfd->fd);
bfd->fd = -1;
+ talloc_free(ts->line);
return -1;
}