1 From 2c5bcb2d5f32ffcf5064d3557e44836fa70700be Mon Sep 17 00:00:00 2001
2 From: Li Qiang <liqiang6-s@360.cn>
3 Date: Mon, 17 Oct 2016 14:13:58 +0200
4 Subject: [PATCH 7/8] 9pfs: fix memory leak in v9fs_write
6 If an error occurs when marshalling the transfer length to the guest, the
7 v9fs_write() function doesn't free an IO vector, thus leading to a memory
8 leak. This patch fixes the issue.
10 Signed-off-by: Li Qiang <liqiang6-s@360.cn>
11 Reviewed-by: Greg Kurz <groug@kaod.org>
12 [groug, rephrased the changelog]
13 Signed-off-by: Greg Kurz <groug@kaod.org>
16 1 file changed, 1 insertion(+), 1 deletion(-)
18 diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
19 index aa2b8c0..af07846 100644
22 @@ -2080,7 +2080,7 @@ static void v9fs_write(void *opaque)
24 err = pdu_marshal(pdu, offset, "d", total);
30 trace_v9fs_write_return(pdu->tag, pdu->id, total, err);