virStoragePoolSourceListNewSource: avoid unconditional leak

* src/conf/storage_conf.c (virStoragePoolSourceListNewSource):
Remove an unused (and leaked) allocation.
This commit is contained in:
Jim Meyering 2010-02-02 19:59:14 +01:00
parent 361e46d6d0
commit 71c865f4d2

View File

@ -1694,13 +1694,7 @@ virStoragePoolSourceListNewSource(virConnectPtr conn,
{
virStoragePoolSourcePtr source;
if (VIR_ALLOC(source) < 0) {
virReportOOMError(conn);
return NULL;
}
if (VIR_REALLOC_N(list->sources, list->nsources+1) < 0) {
VIR_FREE(source);
virReportOOMError(conn);
return NULL;
}