提交 8b13c37f 编写于 作者: P Peter Krempa

conf: domain: Simplify return from backing store parser

Use VIR_STEAL_PTR to remove conditional cleanup.
上级 67a52f70
......@@ -8327,12 +8327,11 @@ virDomainDiskBackingStoreParse(xmlXPathContextPtr ctxt,
virDomainDiskBackingStoreParse(ctxt, backingStore, flags) < 0)
goto cleanup;
src->backingStore = backingStore;
VIR_STEAL_PTR(src->backingStore, backingStore);
ret = 0;
cleanup:
if (ret < 0)
virStorageSourceFree(backingStore);
virStorageSourceFree(backingStore);
VIR_FREE(type);
VIR_FREE(format);
ctxt->node = save_ctxt;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册