summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Willmann <daniel@totalueberwachung.de>2011-08-10 11:40:54 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2011-08-10 13:40:39 +0200
commit28d9ccbca0cb522c90f551cf4bf243acab7a1944 (patch)
treeaa81d88fea2c07cc0efe3aa3d2763aa0677be8f5
parentf7dc7614c251a31061edfe022d45f05e6c5f4c70 (diff)
libbsc: Don't free secondary lchan if it is NULL.
-rw-r--r--openbsc/src/libbsc/bsc_api.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c
index 70d641396..ab71ebb3d 100644
--- a/openbsc/src/libbsc/bsc_api.c
+++ b/openbsc/src/libbsc/bsc_api.c
@@ -137,7 +137,11 @@ static void assignment_t10_timeout(void *_conn)
LOGP(DMSC, LOGL_ERROR, "Assigment T10 timeout on %p\n", conn);
/* normal release on the secondary channel */
- lchan_release(conn->secondary_lchan, 0, 1);
+ if (conn->secondary_lchan) {
+ lchan_release(conn->secondary_lchan, 0, 1);
+ } else {
+ LOGP(DMSC, LOGL_NOTICE, "Secondary lchan is NULL, not releasing\n");
+ }
conn->secondary_lchan = NULL;
/* inform them about the failure */