mirror of https://gitee.com/openkylin/libvirt.git
virStorageVolDefParseXML: Use g_steal_pointer
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
bc3a78f61a
commit
18cc8bb3f6
|
@ -1352,9 +1352,7 @@ virStorageVolDefParseXML(virStoragePoolDefPtr pool,
|
|||
if ((backingStore = virXPathString("string(./backingStore/path)", ctxt))) {
|
||||
def->target.backingStore = virStorageSourceNew();
|
||||
def->target.backingStore->type = VIR_STORAGE_TYPE_FILE;
|
||||
|
||||
def->target.backingStore->path = backingStore;
|
||||
backingStore = NULL;
|
||||
def->target.backingStore->path = g_steal_pointer(&backingStore);
|
||||
|
||||
if (options->formatFromString) {
|
||||
g_autofree char *format = NULL;
|
||||
|
|
Loading…
Reference in New Issue