提交 6a6a5463 编写于 作者: J John Ferlan

qemu: Fix possible memory leak in migration param processing

If virJSONValueArraySize(caps) <= 0, then we will still need to
virJSONValueFree(caps) because qemuMonitorSetMigrationCapabilities
won't consume it.

Found by Coverity
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 6df5d777
......@@ -771,6 +771,7 @@ qemuMigrationParamsApply(virQEMUDriverPtr driver,
migParams->params[xbzrle].set = true;
virJSONValueFree(params);
virJSONValueFree(caps);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册