Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[XForms] Small memleak fix and confirmed patches

0 views
Skip to first unread message

SBP

unread,
Jul 25, 2016, 9:20:24 PM7/25/16
to xforms-de...@nongnu.org
Hi there

I found a small memleak in get_decoration_sizes_from_wm, due to the
data returned by XGetWindowProperty not being freed. Patch is included,
although it's such a small change it can be made manually :-)

<<PATCH
--- forms.c~ 2014-06-28 15:34:29.000000000 -0500
+++ forms.c 2016-07-25 01:46:01.770207523 -0500
@@ -2409,6 +2409,7 @@
*right = ( ( long * ) prop )[ 1 ];
*bottom = ( ( long * ) prop )[ 3 ];
*left = ( ( long * ) prop )[ 0 ];
+ fl_free( prop );
}
else
*top = *right =*bottom = *left = 0;
PATCH

Also I checked the 1.2.5pre1 source and confirmed the patches I
previously sent are included!

Cheers!

SBP

Jens Thoms Toerring

unread,
Jul 26, 2016, 1:35:19 AM7/26/16
to Development with and of XForms
Hi,

On Mon, Jul 25, 2016 at 08:19:41PM -0500, SBP wrote:
> I found a small memleak in get_decoration_sizes_from_wm, due to the
> data returned by XGetWindowProperty not being freed. Patch is included,
> although it's such a small change it can be made manually :-)
>
> <<PATCH
> --- forms.c~ 2014-06-28 15:34:29.000000000 -0500
> +++ forms.c 2016-07-25 01:46:01.770207523 -0500
> @@ -2409,6 +2409,7 @@
> *right = ( ( long * ) prop )[ 1 ];
> *bottom = ( ( long * ) prop )[ 3 ];
> *left = ( ( long * ) prop )[ 0 ];
> + fl_free( prop );
> }
> else
> *top = *right =*bottom = *left = 0;
> PATCH

Uups, right you are! Though I'll use Xfree() to deallocate
it - this probably will do the same, but you never can be
sure what Xlib actually does behind the scenes...

> Also I checked the 1.2.5pre1 source and confirmed the patches I
> previously sent are included!

Good! I'm planning for a new pre-release (I hope there will
be a bit more spare time in the coming days), butI still
have a few things on my to-do list.

Best regards, Jens
--
\ Jens Thoms Toerring ________ j...@toerring.de
\_______________________________ http://toerring.de

0 new messages