Avoid another leak in src/xend_internal.c

* src/xend_internal.c: in xenDaemonLookupByID() if virGetDomain fails
  free up the name
This commit is contained in:
Matthias Bolte 2009-09-08 16:48:20 +02:00 committed by Daniel Veillard
parent 657326cfe3
commit 6fcac926fb

View 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);
}