This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/56/ |
src/hardware/LMI_ProcessorCapabilitiesProvider.c (Diff revision 1) | |||
---|---|---|---|
72 | instance_id_len = |
||
73 | strlen(instace_id_string) + strlen(dmi_cpus[i].id) + 1; |
||
74 | instance_id = (char *)malloc(instance_id_len * sizeof(char)); |
||
75 | if (!instance_id) { |
||
76 | error_msg = "Not enough available memory."; |
||
77 | goto done; |
||
78 | } |
||
79 | snprintf(instance_id, instance_id_len, "%s%s", instace_id_string, |
||
80 | dmi_cpus[i].id); |
Use asprintf to alloc the memory easily (applies to whole patch).
- Jan
On March 25th, 2013, 5:24 p.m. CET, Peter Schiffer wrote:
Review request for OpenLMI Developers.
By Peter Schiffer.
Updated March 25, 2013, 5:24 p.m.
Repository:
openlmi-providers
Description
Diffs
|