Enlightenment CVS committal
Author : tsauerbeck
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_x
Modified Files:
ecore_x_window_prop.c
Log Message:
fixed a memleak in ecore_x_window_prop_state_isset()
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_window_prop.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -3 -r1.42 -r1.43
--- ecore_x_window_prop.c 8 May 2004 04:44:04 -0000 1.42
+++ ecore_x_window_prop.c 31 May 2004 16:03:28 -0000 1.43
@@ -1091,18 +1091,15 @@
int
ecore_x_window_prop_state_isset(Ecore_X_Window win, Ecore_X_Window_State s)
{
- int num, i;
+ int num, i, ret = 0;
unsigned char *data;
Atom *states;
Ecore_X_Atom state;
-
+
state = _ecore_x_window_prop_state_atom_get(s);
if (!ecore_x_window_prop_property_get(win, _ecore_x_atom_net_wm_state,
XA_ATOM, 32, &data, &num))
- {
- XFree(data);
- return 0;
- }
+ return ret;
states = (Atom *) data;
@@ -1110,12 +1107,13 @@
{
if(states[i] == state)
{
- XFree(data);
- return 1;
+ ret = 1;
+ break;
}
}
- return 0;
+ XFree(data);
+ return ret;
}
/**
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs