File fc22b2e7-CVE-2014-3657.patch of Package libvirt.11695

commit fc22b2e74890873848b43fffae43025d22053669
Author: Pavel Hrdina <phrdina@redhat.com>
Date:   Mon Sep 22 18:19:07 2014 +0200

    domain_conf: fix domain deadlock
    
    If you use public api virConnectListAllDomains() with second parameter
    set to NULL to get only the number of domains you will lock out all
    other operations with domains.
    
    Introduced by commit 2c680804.
    
    Signed-off-by: Pavel Hrdina <phrdina@redhat.com>

Index: libvirt-1.2.5/src/conf/domain_conf.c
===================================================================
--- libvirt-1.2.5.orig/src/conf/domain_conf.c
+++ libvirt-1.2.5/src/conf/domain_conf.c
@@ -19359,7 +19359,7 @@ virDomainListPopulate(void *payload,
     /* just count the machines */
     if (!data->domains) {
         data->ndomains++;
-        return;
+        goto cleanup;
     }
 
     if (!(dom = virGetDomain(data->conn, vm->def->name, vm->def->uuid))) {