mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
Fix leak of serial value in xenFormatXM on OOM
If an OOM occurs in xenFormatXM when formatting to the serial device value, the value is leaked. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
760b59e909
commit
0377238fe8
@ -1959,8 +1959,10 @@ virConfPtr xenFormatXM(virConnectPtr conn,
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (xenFormatXMSerial(serialVal, chr) < 0)
|
||||
if (xenFormatXMSerial(serialVal, chr) < 0) {
|
||||
virConfFreeValue(serialVal);
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
if (serialVal->list != NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user