Fix Coverity Scan CID 340290 (Variable msg_p going out of scope leaks the storage it points to.)

This commit is contained in:
Dong Anyuan
2019-06-20 13:53:08 +09:00
parent 2a8ed1a056
commit cd31745af1
+2
View File
@@ -2033,6 +2033,8 @@ int rrc_eNB_send_PATH_SWITCH_REQ(const protocol_ctxt_t *const ctxt_pP,
S1AP_PATH_SWITCH_REQ (msg_p).eNB_ue_s1ap_id, S1AP_PATH_SWITCH_REQ (msg_p).eNB_ue_s1ap_id,
e_rabs_done); e_rabs_done);
itti_send_msg_to_task (TASK_S1AP, ctxt_pP->instance, msg_p); itti_send_msg_to_task (TASK_S1AP, ctxt_pP->instance, msg_p);
} else {
itti_free(ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
} }
return 0; return 0;