pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] psppire-window-base: Avoid memory leak in get_window_id().


From: Ben Pfaff
Subject: Re: [PATCH] psppire-window-base: Avoid memory leak in get_window_id().
Date: Mon, 09 Jul 2012 21:56:53 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

John Darrington <address@hidden> writes:

> On Sun, Jul 08, 2012 at 11:45:48PM -0700, Ben Pfaff wrote:
>      g_object_get() returns a string copy, so the caller has to free it.
>      
>      Found by valgrind.
>      ---
>      Review appreciated.
>
> It seems rather pointless to make a deep copy of this string, only to 
> immediately free it.
> So if g_object_get insists on copying, then I suggest we just use 
> gtk_widget_get_name which 
> does not.

That's much better.  I changed the commit to do that and pushed it.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]