mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
libvirt-qemu: Don't allow NULL cmd in virDomainQemuMonitorCommandWithFiles()
Nothing in daemon code is prepared for the command in virDomainQemuMonitorCommandWithFiles() to be NULL. In fact, the client side doesn't expect this either as our RPC describes the argument as: remote_nonnull_string cmd; Validate the argument in the public API implementation. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
fd08bf2095
commit
9583b0b7e3
@ -153,6 +153,8 @@ virDomainQemuMonitorCommandWithFiles(virDomainPtr domain,
|
||||
virCheckDomainReturn(domain, -1);
|
||||
conn = domain->conn;
|
||||
|
||||
virCheckNonNullArgGoto(cmd, error);
|
||||
|
||||
if (ninfiles > 0 || outfiles) {
|
||||
int rc;
|
||||
if ((rc = VIR_DRV_SUPPORTS_FEATURE(conn->driver, conn,
|
||||
|
Loading…
x
Reference in New Issue
Block a user