From: "Daniel P. Berrange" <berrange@xxxxxxxxxx> If an OOM occurs in xenFormatXM when formatting to the serial device value, the value is leaked. Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx> --- src/xenxs/xen_xm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xenxs/xen_xm.c b/src/xenxs/xen_xm.c index 7550a07..9e07f95 100644 --- a/src/xenxs/xen_xm.c +++ b/src/xenxs/xen_xm.c @@ -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) { -- 1.8.3.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list