mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-26 14:03:49 +03:00
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))) {
|
if ((backingStore = virXPathString("string(./backingStore/path)", ctxt))) {
|
||||||
def->target.backingStore = virStorageSourceNew();
|
def->target.backingStore = virStorageSourceNew();
|
||||||
def->target.backingStore->type = VIR_STORAGE_TYPE_FILE;
|
def->target.backingStore->type = VIR_STORAGE_TYPE_FILE;
|
||||||
|
def->target.backingStore->path = g_steal_pointer(&backingStore);
|
||||||
def->target.backingStore->path = backingStore;
|
|
||||||
backingStore = NULL;
|
|
||||||
|
|
||||||
if (options->formatFromString) {
|
if (options->formatFromString) {
|
||||||
g_autofree char *format = NULL;
|
g_autofree char *format = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user