ecore_x: fix memory leak

check return value type of XGetWindowProperty.
   @fix
This commit is contained in:
Ji-Youn Park 2015-12-24 09:57:34 +08:30
parent b757b30bae
commit 1a3cb45f1c
1 changed files with 2 additions and 2 deletions

View File

@ -1877,7 +1877,7 @@ ecore_x_window_permanent_new(Ecore_X_Window parent, Ecore_X_Atom unique_atom)
XGrabServer(disp);
if (XGetWindowProperty(disp, parent, unique_atom, 0, 0x7fffffff,
False, XA_WINDOW, &type_ret, &format_ret,
&num_ret, &bytes_after, &prop_ret))
&num_ret, &bytes_after, &prop_ret) == Success)
{
if (prop_ret)
{
@ -1889,7 +1889,7 @@ ecore_x_window_permanent_new(Ecore_X_Window parent, Ecore_X_Atom unique_atom)
XFree(prop_ret);
if (XGetWindowProperty(disp, win, unique_atom, 0, 0x7fffffff,
False, XA_WINDOW, &type_ret, &format_ret,
&num_ret, &bytes_after, &prop_ret))
&num_ret, &bytes_after, &prop_ret) == Success)
{
if (prop_ret)
{