ipa: Be consistent in checking conn->cfg (Coverity)

Coverity complains about checking connection->cfg in
bsc_close_connection() at one place but not at the second.

This patch fixes this by adding a check before accessing cfg when
generating the 'partial message' log message.

Fixes: Coverity CID 1195180
Sponsored-by: On-Waves ehf
This commit is contained in:
Jacob Erlbeck 2014-04-03 12:10:24 +02:00 committed by Holger Hans Peter Freyther
parent c8b2c2f10e
commit 4ace424fa7
1 changed files with 1 additions and 1 deletions

View File

@ -916,7 +916,7 @@ void bsc_close_connection(struct bsc_connection *connection)
if (connection->pending_msg) {
LOGP(DNAT, LOGL_ERROR, "Dropping partial message on connection %d.\n",
connection->cfg->nr);
connection->cfg ? connection->cfg->nr : -1);
msgb_free(connection->pending_msg);
connection->pending_msg = NULL;
}