[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH 02/13] virStorageVolDefParseXML: Use g_steal_pointer



Signed-off-by: Peter Krempa <pkrempa redhat com>
---
 src/conf/storage_conf.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index 2b00f09d73..d53d50479b 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -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;
-- 
2.26.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]