mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-24 05:25:18 +00:00
virStoragePoolSourceListNewSource: avoid unconditional leak
* src/conf/storage_conf.c (virStoragePoolSourceListNewSource): Remove an unused (and leaked) allocation.
This commit is contained in:
parent
361e46d6d0
commit
71c865f4d2
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user