提交 6196fd1c 编写于 作者: A ajia@redhat.com 提交者: Eric Blake

vmx: avoid memory leak

* src/vmx/vmx.c: fix memory leak, 'def' has a initial value 'NULL', so
  'goto cleanup' is perfected instead of adding a virConfFree before
  'return NULL'.
Signed-off-by: NAlex Jia <ajia@redhat.com>
上级 d02c4a18
......@@ -1253,7 +1253,7 @@ virVMXParseConfig(virVMXContext *ctx, virCapsPtr caps, const char *vmx)
/* Allocate domain def */
if (VIR_ALLOC(def) < 0) {
virReportOOMError();
return NULL;
goto cleanup;
}
def->virtType = VIR_DOMAIN_VIRT_VMWARE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册