mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
virCapabilitiesFormatCaches: free cpus_str right after use
This will simplify the cleanup when we start checking for buffer errors.
This commit is contained in:
parent
2074ef6cd4
commit
2403dcce51
@ -904,6 +904,7 @@ virCapabilitiesFormatCaches(virBufferPtr buf,
|
|||||||
bank->size >> (kilos * 10),
|
bank->size >> (kilos * 10),
|
||||||
kilos ? "KiB" : "B",
|
kilos ? "KiB" : "B",
|
||||||
cpus_str);
|
cpus_str);
|
||||||
|
VIR_FREE(cpus_str);
|
||||||
|
|
||||||
virBufferAdjustIndent(&controlBuf, indent + 4);
|
virBufferAdjustIndent(&controlBuf, indent + 4);
|
||||||
for (j = 0; j < bank->ncontrols; j++) {
|
for (j = 0; j < bank->ncontrols; j++) {
|
||||||
@ -937,8 +938,6 @@ virCapabilitiesFormatCaches(virBufferPtr buf,
|
|||||||
} else {
|
} else {
|
||||||
virBufferAddLit(buf, "/>\n");
|
virBufferAddLit(buf, "/>\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
VIR_FREE(cpus_str);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virBufferAdjustIndent(buf, -2);
|
virBufferAdjustIndent(buf, -2);
|
||||||
|
Loading…
Reference in New Issue
Block a user