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

[libvirt] [PATCH] fix xenDaemonListDefinedDomains



Commit 790f0b3057787bb64da8c46c111ff8d3eff7b2af causes contents of names
array to be freed even on success, resulting in no listing of defined
but inactive Xen domains. Patch below fixes it.

Regards,
Jim


Index: libvirt-0.7.4/src/xen/xend_internal.c
===================================================================
--- libvirt-0.7.4.orig/src/xen/xend_internal.c
+++ libvirt-0.7.4/src/xen/xend_internal.c
@@ -4693,13 +4693,14 @@ xenDaemonListDefinedDomains(virConnectPt
         }
 
         if (ret >= maxnames)
-            break;
+            goto out;
     }
 
 error:
     for (i = 0; i < ret; ++i)
         VIR_FREE(names[i]);
 
+out:
     sexpr_free(root);
     return(ret);
 }

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