Commit fdb47bed authored by Dong Anyuan's avatar Dong Anyuan

Fix Coverity Scan CID 300383 (Variable sl_CommConfig going out of scope leaks...

Fix Coverity Scan CID 300383 (Variable sl_CommConfig going out of scope leaks the storage it points to.)
parent 40100273
...@@ -8257,9 +8257,10 @@ rrc_eNB_generate_RRCConnectionReconfiguration_Sidelink( ...@@ -8257,9 +8257,10 @@ rrc_eNB_generate_RRCConnectionReconfiguration_Sidelink(
LTE_SL_CommConfig_r12_t rrc_eNB_get_sidelink_commTXPool( const protocol_ctxt_t *const ctxt_pP, rrc_eNB_ue_context_t *const ue_context_pP, LTE_SL_DestinationInfoList_r12_t *destinationInfoList ) { LTE_SL_CommConfig_r12_t rrc_eNB_get_sidelink_commTXPool( const protocol_ctxt_t *const ctxt_pP, rrc_eNB_ue_context_t *const ue_context_pP, LTE_SL_DestinationInfoList_r12_t *destinationInfoList ) {
// for the moment, use scheduled resource allocation // for the moment, use scheduled resource allocation
LTE_SL_CommConfig_r12_t *sl_CommConfig; LTE_SL_CommConfig_r12_t sl_CommConfig_r12;
LTE_SL_CommConfig_r12_t *sl_CommConfig = &sl_CommConfig_r12;
LTE_SL_CommResourcePool_r12_t *sc_CommTxConfig; LTE_SL_CommResourcePool_r12_t *sc_CommTxConfig;
sl_CommConfig = CALLOC(1, sizeof(struct LTE_SL_CommConfig_r12)); memset(sl_CommConfig,0,sizeof(LTE_SL_CommConfig_r12_t));
sl_CommConfig->commTxResources_r12 = CALLOC(1, sizeof(*sl_CommConfig->commTxResources_r12)); sl_CommConfig->commTxResources_r12 = CALLOC(1, sizeof(*sl_CommConfig->commTxResources_r12));
sl_CommConfig->commTxResources_r12->present = LTE_SL_CommConfig_r12__commTxResources_r12_PR_setup; sl_CommConfig->commTxResources_r12->present = LTE_SL_CommConfig_r12__commTxResources_r12_PR_setup;
sl_CommConfig->commTxResources_r12->choice.setup.present = LTE_SL_CommConfig_r12__commTxResources_r12__setup_PR_scheduled_r12; sl_CommConfig->commTxResources_r12->choice.setup.present = LTE_SL_CommConfig_r12__commTxResources_r12__setup_PR_scheduled_r12;
......
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