diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-09-04 08:45:48 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-09-04 08:45:48 +0200 |
commit | 3ffd9bc0a4efe03022d87513dbde3efc7b4fb8e6 (patch) | |
tree | fe90cb71d85ed7a528109d91b7e252d4bf288450 /openbsc/src/libbsc/bsc_msc.c | |
parent | 1b9902c1280b3b1092b726695142a09a1edcb154 (diff) |
bsc_msc: Fix possible null pointer dereference
In case the allocation of con is failing, do not attempt to
print con->name as this will be a null pointer dereference.
Fixes: Coverity CID 1076318
Diffstat (limited to 'openbsc/src/libbsc/bsc_msc.c')
-rw-r--r-- | openbsc/src/libbsc/bsc_msc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/openbsc/src/libbsc/bsc_msc.c b/openbsc/src/libbsc/bsc_msc.c index c8cdce0c3..1a0f78aea 100644 --- a/openbsc/src/libbsc/bsc_msc.c +++ b/openbsc/src/libbsc/bsc_msc.c @@ -226,9 +226,7 @@ struct bsc_msc_connection *bsc_msc_create(void *ctx, struct llist_head *dests) con = talloc_zero(NULL, struct bsc_msc_connection); if (!con) { - LOGP(DMSC, LOGL_FATAL, - "Failed to create the MSC(%s) connection.\n", - con->name); + LOGP(DMSC, LOGL_FATAL, "Failed to create the MSC connection.\n"); return NULL; } |