Skip to content

Commit f1f892b

Browse files
authored
Merge pull request #2039 from l2dy/osp
osp: actually fix potential use of uninitialized pointer
2 parents 31fbdc9 + c8a99ad commit f1f892b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

modules/osp/orig_transaction.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ int ospRequestRouting(
451451
char cinfo[OSP_DEF_CINFONUM][OSP_STRBUF_SIZE];
452452
char cinfostr[OSP_STRBUF_SIZE];
453453
unsigned int callidnumber = 1;
454-
OSPT_CALL_ID* callids[callidnumber];
454+
OSPT_CALL_ID* callids[callidnumber] = { NULL };
455455
unsigned int logsize = 0;
456456
char* detaillog = NULL;
457457
char desthost[OSP_STRBUF_SIZE];
@@ -471,7 +471,6 @@ int ospRequestRouting(
471471
if ((errcode = OSPPTransactionNew(_osp_provider, &trans)) != OSPC_ERR_NO_ERROR) {
472472
LM_ERR("failed to create new OSP transaction (%d)\n", errcode);
473473
} else if (ospGetCallId(msg, &(callids[0])) != 0) {
474-
callids[0] = NULL;
475474
LM_ERR("failed to extract call id\n");
476475
} else if (ospGetFromUser(msg, inbound.calling, sizeof(inbound.calling)) != 0) {
477476
LM_ERR("failed to extract calling number\n");

0 commit comments

Comments
 (0)