mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
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>
This commit is contained in:
parent
4c1586787f
commit
fdfcc9aeea
1 changed files with 1 additions and 1 deletions
|
@ -2090,7 +2090,7 @@ static void coroutine_fn v9fs_write(void *opaque)
|
|||
offset = 7;
|
||||
err = pdu_marshal(pdu, offset, "d", total);
|
||||
if (err < 0) {
|
||||
goto out;
|
||||
goto out_qiov;
|
||||
}
|
||||
err += offset;
|
||||
trace_v9fs_write_return(pdu->tag, pdu->id, total, err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue