summaryrefslogtreecommitdiffstats
path: root/src/app.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-03-31 19:36:27 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-03-31 19:36:27 +0200
commitbec32eb2073a5ae669260a7634bd91a245ce3e30 (patch)
tree1a5b565b839be84576fff94a3c0884e77c67f8bb /src/app.c
parentadc7484a0c65caf01278759804535e4072e27fa2 (diff)
coverity: Address two issues found by coverity
Add NULL check in the case of MNCC disconnect that was missing and add an assert to show that at this point the other leg must exist. Fixes: CID#80799, CID#80800, 80801
Diffstat (limited to 'src/app.c')
-rw-r--r--src/app.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/app.c b/src/app.c
index 0fe149b..47ee150 100644
--- a/src/app.c
+++ b/src/app.c
@@ -44,8 +44,10 @@ void app_mncc_disconnected(struct mncc_connection *conn)
*/
LOGP(DAPP, LOGL_NOTICE,
"Going to release call(%u) due MNCC.\n", call->id);
- call_leg_release(call->initial);
- call_leg_release(call->remote);
+ if (call->initial)
+ call_leg_release(call->initial);
+ if (call->remote)
+ call_leg_release(call->remote);
}
}