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

Protected against potential crash scenarios

* src/qemu_driver.c: Check that monitor device is not NULL
  before runing a command to protect against bugs in caller
上级 88e3e8be
......@@ -2299,6 +2299,11 @@ qemudMonitorCommandExtra(const virDomainObjPtr vm,
int size = 0;
char *buf = NULL;
/* Should never happen, but just in case, protect
* against null monitor (ocurrs when VM is inactive) */
if (!vm->monitor_chr)
return -1;
qemuMonitorDiscardPendingData(vm);
if (qemudMonitorSend(vm, cmd, scm_fd) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册