From 6fcac926fbafdf2e2f48e8b75a9c68d773489605 Mon Sep 17 00:00:00 2001 From: Matthias Bolte Date: Tue, 8 Sep 2009 16:48:20 +0200 Subject: [PATCH] Avoid another leak in src/xend_internal.c * src/xend_internal.c: in xenDaemonLookupByID() if virGetDomain fails free up the name --- src/xend_internal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xend_internal.c b/src/xend_internal.c index ed6fcac102..f6b33ab168 100644 --- a/src/xend_internal.c +++ b/src/xend_internal.c @@ -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); }