diff options
| author | Stefan Hajnoczi <stefanha@redhat.com> | 2020-09-24 16:15:43 +0100 |
|---|---|---|
| committer | Stefan Hajnoczi <stefanha@redhat.com> | 2020-10-23 13:42:16 +0100 |
| commit | 8c7f7cbca0eb49cc86333ef8fa8068abb400520e (patch) | |
| tree | a5fd31d6e2ff366b20bcf06609a2bdb7b19512e2 /util/vhost-user-server.h | |
| parent | 47ba680466d83adfa8c58620d4f5855c0de1a144 (diff) | |
| download | focaccia-qemu-8c7f7cbca0eb49cc86333ef8fa8068abb400520e.tar.gz focaccia-qemu-8c7f7cbca0eb49cc86333ef8fa8068abb400520e.zip | |
util/vhost-user-server: fix memory leak in vu_message_read()
fds[] is leaked when qio_channel_readv_full() fails. Use vmsg->fds[] instead of keeping a local fds[] array. Then we can reuse goto fail to clean up fds. vmsg->fd_num must be zeroed before the loop to make this safe. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 20200924151549.913737-8-stefanha@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'util/vhost-user-server.h')
0 files changed, 0 insertions, 0 deletions