[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] virtio-9p: Fix a memory leak
From: |
Pedro Scarapicchia Junior |
Subject: |
[Qemu-devel] [PATCH] virtio-9p: Fix a memory leak |
Date: |
Fri, 6 May 2011 16:05:47 -0300 |
At v9fs_walk_complete(), the memory allocated at v9fs_walk() is not being
released leading system to crash due out of memory.
This patch releases structure V9fsWalkState after v9fs_walk is complete.
Signed-off-by: Pedro Scarapicchia Junior <address@hidden>
---
hw/9pfs/virtio-9p.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
index b5fc52b..b1da2b7 100644
--- a/hw/9pfs/virtio-9p.c
+++ b/hw/9pfs/virtio-9p.c
@@ -1490,6 +1490,8 @@ static void v9fs_walk_complete(V9fsState *s,
V9fsWalkState *vs, int err)
qemu_free(vs->wnames);
qemu_free(vs->qids);
}
+
+ qemu_free(vs);
}
static void v9fs_walk_marshal(V9fsWalkState *vs)
--
1.7.1
- [Qemu-devel] [PATCH] virtio-9p: Fix a memory leak,
Pedro Scarapicchia Junior <=