Commit 94048238 authored by Dong Anyuan's avatar Dong Anyuan

Fix Coverity Scan CID 300420 (Variable ul_mac_config_msg going out of scope...

Fix Coverity Scan CID 300420 (Variable ul_mac_config_msg going out of scope leaks the storage it points to.)
parent f1f38a06
...@@ -1192,8 +1192,10 @@ int flexran_agent_mac_create_empty_ul_config(mid_t mod_id, Protocol__FlexranMess ...@@ -1192,8 +1192,10 @@ int flexran_agent_mac_create_empty_ul_config(mid_t mod_id, Protocol__FlexranMess
ul_mac_config_msg->sfn_sf = flexran_get_sfn_sf(mod_id); ul_mac_config_msg->sfn_sf = flexran_get_sfn_sf(mod_id);
*msg = malloc(sizeof(Protocol__FlexranMessage)); *msg = malloc(sizeof(Protocol__FlexranMessage));
if(*msg == NULL) if(*msg == NULL) {
free(ul_mac_config_msg);
goto error; goto error;
}
protocol__flexran_message__init(*msg); protocol__flexran_message__init(*msg);
(*msg)->msg_case = PROTOCOL__FLEXRAN_MESSAGE__MSG_UL_MAC_CONFIG_MSG; (*msg)->msg_case = PROTOCOL__FLEXRAN_MESSAGE__MSG_UL_MAC_CONFIG_MSG;
(*msg)->msg_dir = PROTOCOL__FLEXRAN_DIRECTION__INITIATING_MESSAGE; (*msg)->msg_dir = PROTOCOL__FLEXRAN_DIRECTION__INITIATING_MESSAGE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment