9pfs: fix memory leak in v9fs_write
authorLi Qiang <liqiang6-s@360.cn>
Mon, 17 Oct 2016 12:13:58 +0000 (14:13 +0200)
committerGreg Kurz <groug@kaod.org>
Mon, 17 Oct 2016 12:13:58 +0000 (14:13 +0200)
commitfdfcc9aeea1492f4b819a24c94dfb678145b1bf9
tree52b31c58fb39440398d2e623a47d8db692108951
parent4c1586787ff43c9acd18a56c12d720e3e6be9f7c
9pfs: fix memory leak in v9fs_write

If an error occurs when marshalling the transfer length to the guest, the
v9fs_write() function doesn't free an IO vector, thus leading to a memory
leak. This patch fixes the issue.

Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Reviewed-by: Greg Kurz <groug@kaod.org>
[groug, rephrased the changelog]
Signed-off-by: Greg Kurz <groug@kaod.org>
hw/9pfs/9p.c