leak schmeak! bad!

SVN revision: 12244
This commit is contained in:
Carsten Haitzler 2004-11-24 08:52:22 +00:00
parent c1618e59fc
commit de8fe90ded
1 changed files with 7 additions and 1 deletions

View File

@ -839,6 +839,7 @@ ecore_x_window_prop_borderless_get(Ecore_X_Window win)
{ {
unsigned char *data; unsigned char *data;
int num; int num;
int borderless = 0;
ecore_x_window_prop_property_get(win, ecore_x_window_prop_property_get(win,
_ecore_x_atom_motif_wm_hints, _ecore_x_atom_motif_wm_hints,
@ -848,7 +849,12 @@ ecore_x_window_prop_borderless_get(Ecore_X_Window win)
/* check for valid data. only read the borderless flag if the /* check for valid data. only read the borderless flag if the
* decorations data has been set. * decorations data has been set.
*/ */
return (data && num > 2 && data[0] & 2) ? !data[2] : 0; if (data)
{
borderless = ((num > 2) && (data[0] & 2)) ? !data[2] : 0;
free(data);
}
return borderless;
} }
/** /**