]> git.proxmox.com Git - qemu.git/blobdiff - monitor.c
do not check pointers after dereferencing them
[qemu.git] / monitor.c
index 6ce2a4e61b95040ea334fca31e5af0cacf6ba3e8..eefc7f083f879bd6d7216e1a9cbc3adbb0ec365d 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -280,7 +280,7 @@ void monitor_flush(Monitor *mon)
     buf = qstring_get_str(mon->outbuf);
     len = qstring_get_length(mon->outbuf);
 
-    if (mon && len && !mon->mux_out) {
+    if (len && !mon->mux_out) {
         rc = qemu_chr_fe_write(mon->chr, (const uint8_t *) buf, len);
         if (rc == len) {
             /* all flushed */