]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Avoid another leak in src/xend_internal.c
authorMatthias Bolte <matthias.bolte@googlemail.com>
Tue, 8 Sep 2009 14:48:20 +0000 (16:48 +0200)
committerDaniel Veillard <veillard@redhat.com>
Tue, 8 Sep 2009 14:51:26 +0000 (16:51 +0200)
* src/xend_internal.c: in xenDaemonLookupByID() if virGetDomain fails
  free up the name

src/xend_internal.c

index ed6fcac1021a48360f33563f220db23091549d23..f6b33ab168850289d67b4f6b8f69343fb4290d27 100644 (file)
@@ -3975,9 +3975,11 @@ xenDaemonLookupByUUID(virConnectPtr conn, const unsigned char *uuid)
         return (NULL);
 
     ret = virGetDomain(conn, name, uuid);
-    if (ret == NULL) return NULL;
+    if (ret == NULL) goto cleanup;
 
     ret->id = id;
+
+  cleanup:
     VIR_FREE(name);
     return (ret);
 }