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

[libvirt] Free name in xenDaemonLookupByID(), if virGetDomain() fails



Subject says it all.

Matthias
diff --git a/src/xend_internal.c b/src/xend_internal.c
index 2fa08f1..ed6fcac 100644
--- a/src/xend_internal.c
+++ b/src/xend_internal.c
@@ -3723,7 +3723,7 @@ xenDaemonLookupByID(virConnectPtr conn, int id) {
     }
 
     ret = virGetDomain(conn, name, uuid);
-    if (ret == NULL) return NULL;
+    if (ret == NULL) goto error;
 
     ret->id = id;
     VIR_FREE(name);

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