Re: [Qemu-devel] [PATCH] hw/9pfs: Fix potential memory leak and avoid reuse of freed memory

2013-07-19 Thread Stefan Weil
Am 04.07.2013 10:53, schrieb M. Mohan Kumar: > Stefan Weil writes: > >> The leak was reported by cppcheck. >> >> Function proxy_init also calls g_free for ctx->fs_root. >> Avoid reuse of this memory by setting ctx->fs_root to NULL. >> >> Signed-off-by: Stefan Weil > Reviewed-by: M. Mohan Kumar >

Re: [Qemu-devel] [PATCH] hw/9pfs: Fix potential memory leak and avoid reuse of freed memory

2013-07-04 Thread M. Mohan Kumar
Stefan Weil writes: > The leak was reported by cppcheck. > > Function proxy_init also calls g_free for ctx->fs_root. > Avoid reuse of this memory by setting ctx->fs_root to NULL. > > Signed-off-by: Stefan Weil Reviewed-by: M. Mohan Kumar > --- > > Hi, > > I'm not sure whether ctx->fs_root shoul

Re: [Qemu-devel] [PATCH] hw/9pfs: Fix potential memory leak and avoid reuse of freed memory

2013-07-02 Thread Stefan Weil
Am 16.06.2013 12:14, schrieb Stefan Weil: > The leak was reported by cppcheck. > > Function proxy_init also calls g_free for ctx->fs_root. > Avoid reuse of this memory by setting ctx->fs_root to NULL. > > Signed-off-by: Stefan Weil > --- > > Hi, > > I'm not sure whether ctx->fs_root should also be

[Qemu-devel] [PATCH] hw/9pfs: Fix potential memory leak and avoid reuse of freed memory

2013-06-16 Thread Stefan Weil
The leak was reported by cppcheck. Function proxy_init also calls g_free for ctx->fs_root. Avoid reuse of this memory by setting ctx->fs_root to NULL. Signed-off-by: Stefan Weil --- Hi, I'm not sure whether ctx->fs_root should also be freed in the error case. Please feel free to modify my patc