[PATCH 6/6] conf: fix uninitialized variable in virDomainListSnapshots

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

 



If allocation of names fails, list is uninitialized.
---
 src/conf/snapshot_conf.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c
index 06be34d..bba1bb7 100644
--- a/src/conf/snapshot_conf.c
+++ b/src/conf/snapshot_conf.c
@@ -1021,7 +1021,7 @@ virDomainListSnapshots(virDomainSnapshotObjListPtr snapshots,
                        unsigned int flags)
 {
     int count = virDomainSnapshotObjListNum(snapshots, from, flags);
-    virDomainSnapshotPtr *list;
+    virDomainSnapshotPtr *list = NULL;
     char **names;
     int ret = -1;
     int i;
-- 
1.7.8.6

--
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]