diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2011-06-30 15:04:23 +0100 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2011-06-30 18:04:02 +0100 |
commit | f870c99b4583db0e74b33c9334f195f4feed304b (patch) | |
tree | a86a32792752e593f8c281d9f280b734911c8ed5 | |
parent | Fix leak of JSON object for events (diff) | |
download | libvirt-f870c99b4583db0e74b33c9334f195f4feed304b.tar.gz libvirt-f870c99b4583db0e74b33c9334f195f4feed304b.tar.bz2 libvirt-f870c99b4583db0e74b33c9334f195f4feed304b.zip |
Fix uninitialized value in QEMU monitor FD sending code
The 'char control[CMSG_SPACE(sizeof(int))];' was not being
wiped, so could potentially contain uninitialized bytes.
While this was harmless in this case, it caused complaints
from valgrind
* src/qemu/qemu_monitor.c: memset 'control' variable
in qemuMonitorIOWriteWithFD
-rw-r--r-- | src/qemu/qemu_monitor.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index e995d9781..85732621a 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -383,6 +383,7 @@ qemuMonitorIOWriteWithFD(qemuMonitorPtr mon, struct cmsghdr *cmsg; memset(&msg, 0, sizeof(msg)); + memset(control, 0, sizeof(control)); iov[0].iov_base = (void *)data; iov[0].iov_len = len; |