conf: fix uninitialized variable in virDomainListSnapshots

If allocation of names fails, list is uninitialized.
(cherry picked from commit 892582f9de)
This commit is contained in:
Ján Tomko 2012-11-29 11:55:54 +01:00 committed by Cole Robinson
parent e8d28ec3fa
commit 2f4d266d1f

View File

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