libbsc: Don't free secondary lchan if it is NULL.

This commit is contained in:
Daniel Willmann 2011-08-10 11:40:54 +02:00 committed by Pablo Neira Ayuso
parent f7dc7614c2
commit 28d9ccbca0
1 changed files with 5 additions and 1 deletions

View File

@ -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 */