libqcdm: plug leak in qcdm_cdm_log_config_new()
==748616== 37 bytes in 1 blocks are definitely lost in loss record 2,850 of 4,938 ==748616== at 0x48435FF: calloc (vg_replace_malloc.c:1117) ==748616== by 0x249CCF: qcdm_cmd_log_config_new (commands.c:1742) ==748616== by 0x24A321: qcdm_cmd_log_config_set_mask_new (commands.c:1901) ==748616== by 0x1DAE12: modem_cdma_setup_cleanup_unsolicited_events (mm-broadband-modem.c:8643) ==748616== by 0x1DAF21: modem_cdma_setup_unsolicited_events (mm-broadband-modem.c:8671) ==748616== by 0x1AE49F: interface_enabling_step (mm-iface-modem-cdma.c:1627) ==748616== by 0x1AE680: mm_iface_modem_cdma_enable (mm-iface-modem-cdma.c:1693) ==748616== by 0x1E2DF6: enabling_step (mm-broadband-modem.c:11756) ==748616== by 0x1E204E: iface_modem_3gpp_ussd_enable_ready (mm-broadband-modem.c:11606) ==748616== by 0x4F03533: g_task_return_now (gtask.c:1219) ==748616== by 0x4F07078: UnknownInlinedFun (gtask.c:1289) ==748616== by 0x4F07078: g_task_return (gtask.c:1245) ==748616== by 0x1AA323: interface_enabling_step (mm-iface-modem-3gpp-ussd.c:702)
This commit is contained in:
@@ -1720,6 +1720,7 @@ qcdm_cmd_log_config_new (char *buf,
|
|||||||
size_t cmdsize = 0, cmdbufsize;
|
size_t cmdsize = 0, cmdbufsize;
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
uint16_t log_code;
|
uint16_t log_code;
|
||||||
|
size_t ret;
|
||||||
|
|
||||||
qcdm_return_val_if_fail (buf != NULL, 0);
|
qcdm_return_val_if_fail (buf != NULL, 0);
|
||||||
qcdm_return_val_if_fail ((equip_id & 0xFFF0) == 0, 0);
|
qcdm_return_val_if_fail ((equip_id & 0xFFF0) == 0, 0);
|
||||||
@@ -1753,7 +1754,10 @@ qcdm_cmd_log_config_new (char *buf,
|
|||||||
cmd->num_items = htole32 (highest);
|
cmd->num_items = htole32 (highest);
|
||||||
}
|
}
|
||||||
|
|
||||||
return dm_encapsulate_buffer ((char *) cmd, cmdsize, cmdbufsize, buf, len);
|
ret = dm_encapsulate_buffer ((char *) cmd, cmdsize, cmdbufsize, buf, len);
|
||||||
|
free (cmd);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
|
Reference in New Issue
Block a user