From 2f4d266d1fad1905c7914761fd219884bd62e75e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Thu, 29 Nov 2012 11:55:54 +0100 Subject: [PATCH] conf: fix uninitialized variable in virDomainListSnapshots If allocation of names fails, list is uninitialized. (cherry picked from commit 892582f9deb1a4c4200a3d0bdfe6a2a94b039ef2) --- src/conf/snapshot_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index 0085352eba..7812dd50d2 100644 --- a/src/conf/snapshot_conf.c +++ b/src/conf/snapshot_conf.c @@ -935,7 +935,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;