[libvirt] [PATCH] Fix crash in storageVolumeCreateXML

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

 



Hello,
storageVolumeCreateXML() recently started unconditionally accessing
vol->name with vol == NULL.  The attached patch fixes that.
	Mirek
Index: src/storage_driver.c
===================================================================
RCS file: /data/cvs/libvirt/src/storage_driver.c,v
retrieving revision 1.24
diff -u -p -r1.24 storage_driver.c
--- src/storage_driver.c	11 Dec 2008 15:00:12 -0000	1.24
+++ src/storage_driver.c	15 Dec 2008 14:27:19 -0000
@@ -1235,9 +1235,9 @@ storageVolumeCreateXML(virStoragePoolPtr
     }
 
     pool->volumes.objs[pool->volumes.count++] = vol;
-    vol = NULL;
 
     ret = virGetStorageVol(obj->conn, pool->def->name, vol->name, vol->key);
+    vol = NULL;
 
 cleanup:
     virStorageVolDefFree(vol);
--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]