2009-04-01 Alberto Garcia <agarcia@igalia.com>
authorAlberto Garcia <agarcia@igalia.com>
Wed, 1 Apr 2009 13:38:17 +0000 (13:38 +0000)
committerAlberto Garcia <agarcia@igalia.com>
Wed, 1 Apr 2009 13:38:17 +0000 (13:38 +0000)
* src/hildon-program.c (hildon_program_update_top_most):
Fix memory leak.

Fixes: NB#109179 (Memory leak in Hildon program)

ChangeLog
src/hildon-program.c

index 41a51b1..0cfb6aa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2009-04-01  Alberto Garcia  <agarcia@igalia.com>
 
+       * src/hildon-program.c (hildon_program_update_top_most):
+       Fix memory leak.
+
+       Fixes: NB#109179 (Memory leak in Hildon program)
+
+2009-04-01  Alberto Garcia  <agarcia@igalia.com>
+
        * src/hildon-banner.c (-get_current_app_window):
        Remove unused function.
 
index f45e49f..79639a3 100644 (file)
@@ -354,7 +354,11 @@ hildon_program_update_top_most                  (HildonProgram *program)
       wm_hints = XGetWMHints (GDK_DISPLAY (), active_window);
       xerror = gdk_error_trap_pop ();
       if (xerror)
+      {
+        if (wm_hints)
+          XFree (wm_hints);
         return;
+      }
 
       if (wm_hints)
       {