提交 7596df34 编写于 作者: P Peter Krempa

conf: caps: Automaticaly free 'cpus_str'

Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 d95eded4
......@@ -948,7 +948,7 @@ virCapabilitiesFormatCaches(virBufferPtr buf,
for (i = 0; i < cache->nbanks; i++) {
virCapsHostCacheBankPtr bank = cache->banks[i];
char *cpus_str = virBitmapFormat(bank->cpus);
g_autofree char *cpus_str = virBitmapFormat(bank->cpus);
const char *unit = NULL;
unsigned long long short_size = virFormatIntPretty(bank->size, &unit);
......@@ -965,7 +965,6 @@ virCapabilitiesFormatCaches(virBufferPtr buf,
bank->id, bank->level,
virCacheTypeToString(bank->type),
short_size, unit, cpus_str);
VIR_FREE(cpus_str);
virBufferSetChildIndent(&childrenBuf, buf);
for (j = 0; j < bank->ncontrols; j++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册