src/test.c (testLoadDomain): Avoid leaks upon failure.

This commit is contained in:
Jim Meyering 2008-01-30 19:57:13 +00:00
parent 1217e5d516
commit 34dff95bfd
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,7 @@
Wed Jan 30 20:49:34 CET 2008 Jim Meyering <meyering@redhat.com>
* src/test.c (testLoadDomain): Avoid leaks upon failure.
Avoid used-uninitialized errors in test driver.
* src/test.c (testOpenFromFile): Initialize "privconn".

View File

@ -327,7 +327,7 @@ static int testLoadDomain(virConnectPtr conn,
}
}
if (handle < 0)
return (-1);
goto error;
privconn->domains[handle].active = 1;
privconn->domains[handle].id = domid;