mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-24 13:35:17 +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;
|
virStoragePoolSourcePtr source;
|
||||||
|
|
||||||
if (VIR_ALLOC(source) < 0) {
|
|
||||||
virReportOOMError(conn);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (VIR_REALLOC_N(list->sources, list->nsources+1) < 0) {
|
if (VIR_REALLOC_N(list->sources, list->nsources+1) < 0) {
|
||||||
VIR_FREE(source);
|
|
||||||
virReportOOMError(conn);
|
virReportOOMError(conn);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user