diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-05-31 14:00:27 +0200 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2013-06-11 17:28:24 -0500 |
commit | baa8a8b44452f4a51de5ba33089dd8882d3fa545 (patch) | |
tree | 3a94f1f255986a13f386b869c599342bc66ce851 /monitor.c | |
parent | 327e75b537c3b7bc25ac83bedeb4a40c782796c3 (diff) | |
download | qemu-baa8a8b44452f4a51de5ba33089dd8882d3fa545.tar.gz |
do not check pointers after dereferencing them
Two instances, both spotted by Coverity. In one, two blocks were
swapped. In the other, the check is not needed anymore.
Cc: qemu-stable@nongnu.org
Cc: qemu-trivial@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(cherry picked from commit a4cc73d629d43c8a4d171d043ff229a959df3ca6)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -281,7 +281,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 */ |