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:
Peter Krempa 2020-09-22 11:06:25 +02:00
parent bc3a78f61a
commit 18cc8bb3f6
1 changed files with 1 additions and 3 deletions

View File

@ -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;