mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-26 14:03:49 +03:00
Avoid leak in qemuParseRBDString on failure of qemuAddRBDHost
If qemuAddRBDHost fails due to parsing problems or OOM, then qemuParseRBDString cleanup is skipped causing a memory leak. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
e7b7a2019d
commit
d7e9f9f7e8
@ -3404,9 +3404,9 @@ static int qemuParseRBDString(virDomainDiskDefPtr disk)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (qemuAddRBDHost(disk, h) < 0) {
|
||||
return -1;
|
||||
}
|
||||
if (qemuAddRBDHost(disk, h) < 0)
|
||||
goto error;
|
||||
|
||||
h = sep;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user