提交 8ad7eceb 编写于 作者: J John Ferlan

qemu: Need to free fileprops in error path

The virJSONValueObjectCreate only consumes the object on success, so on
failure we must free - from commit id 'f4441017' (found by Coverity).
上级 5d8c31c6
......@@ -1038,8 +1038,10 @@ qemuGetDriveSourceProps(virStorageSourcePtr src,
}
if (fileprops &&
virJSONValueObjectCreate(props, "a:file", fileprops, NULL) < 0)
virJSONValueObjectCreate(props, "a:file", fileprops, NULL) < 0) {
virJSONValueFree(fileprops);
return -1;
}
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册