mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00: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 */
|
||||
if (def->description != NULL) {
|
||||
annotation = virVMXEscapeHexPipe(def->description);
|
||||
if (!(annotation = virVMXEscapeHexPipe(def->description)))
|
||||
goto cleanup;
|
||||
|
||||
virBufferAsprintf(&buffer, "annotation = \"%s\"\n", annotation);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user