提交 1f66001c 编写于 作者: D Daniel P. Berrange

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: NDaniel P. Berrange <berrange@redhat.com>
上级 6b663b6f
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册