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
This commit is contained in:
Holger Hans Peter Freyther 2013-09-04 08:45:48 +02:00
parent 1b9902c128
commit 3ffd9bc0a4
1 changed files with 1 additions and 3 deletions

View File

@ -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;
}