Re: [Qemu-devel] [PATCH] gdbstub: Fix memory leak

2011-10-23 Thread Blue Swirl
On Thu, Oct 20, 2011 at 08:10, Stuart Brady wrote: > On Wed, Oct 19, 2011 at 01:59:04AM +0100, Stuart Brady wrote: >> On Tue, Oct 18, 2011 at 06:18:11PM +, Blue Swirl wrote: >> >> > Cool. Please include the spatch with the commit message. >> >> Thanks, will do! > > Okay, submitted. > > This is

Re: [Qemu-devel] [PATCH] gdbstub: Fix memory leak

2011-10-20 Thread Stuart Brady
On Wed, Oct 19, 2011 at 01:59:04AM +0100, Stuart Brady wrote: > On Tue, Oct 18, 2011 at 06:18:11PM +, Blue Swirl wrote: > > > Cool. Please include the spatch with the commit message. > > Thanks, will do! Okay, submitted. This is the first time I've used git send-email, so let me know if I'v

Re: [Qemu-devel] [PATCH] gdbstub: Fix memory leak

2011-10-18 Thread Stuart Brady
On Tue, Oct 18, 2011 at 06:18:11PM +, Blue Swirl wrote: > Cool. Please include the spatch with the commit message. Thanks, will do! FWIW, it results in: 51 files changed, 99 insertions(+), 136 deletions(-) I wonder if that needs splitting up at all? > IIRC I had also problems with identi

Re: [Qemu-devel] [PATCH] gdbstub: Fix memory leak

2011-10-18 Thread Blue Swirl
On Tue, Oct 18, 2011 at 1:13 AM, Stuart Brady wrote: > On Mon, Oct 17, 2011 at 10:01:25PM +0200, Stefan Weil wrote: >> >> The patch also slightly cleans the g_malloc0 statement which was >> touched by that change (no type cast, easier code review). > [...] >> -    s = (GDBRegisterState *)g_malloc0

Re: [Qemu-devel] [PATCH] gdbstub: Fix memory leak

2011-10-17 Thread Stuart Brady
On Mon, Oct 17, 2011 at 10:01:25PM +0200, Stefan Weil wrote: > > The patch also slightly cleans the g_malloc0 statement which was > touched by that change (no type cast, easier code review). [...] > -s = (GDBRegisterState *)g_malloc0(sizeof(GDBRegisterState)); [...] > +s = g_malloc0(sizeof

[Qemu-devel] [PATCH] gdbstub: Fix memory leak

2011-10-17 Thread Stefan Weil
cppcheck report: gdbstub.c:1781: error: Memory leak: s Rearranging of the code avoids the leak. The patch also slightly cleans the g_malloc0 statement which was touched by that change (no type cast, easier code review). Signed-off-by: Stefan Weil --- gdbstub.c | 14 -- 1 files