mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Add missing check for OOM with virVMXEscapeHexPipe
The virVMXFormatConfig called virVMXEscapeHexPipe but forgot to check for OOM. This caused data to silently be lost. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
6b663b6fd1
commit
1f66001c69
@ -3096,7 +3096,8 @@ virVMXFormatConfig(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virDomainDe
|
|||||||
|
|
||||||
/* def:description -> vmx:annotation */
|
/* def:description -> vmx:annotation */
|
||||||
if (def->description != NULL) {
|
if (def->description != NULL) {
|
||||||
annotation = virVMXEscapeHexPipe(def->description);
|
if (!(annotation = virVMXEscapeHexPipe(def->description)))
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
virBufferAsprintf(&buffer, "annotation = \"%s\"\n", annotation);
|
virBufferAsprintf(&buffer, "annotation = \"%s\"\n", annotation);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user