probably a leak fix in ecor-eglib support - doesnt cause any issues in
authorCarsten Haitzler <raster@rasterman.com>
Tue, 20 Dec 2011 05:57:57 +0000 (05:57 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Tue, 20 Dec 2011 05:57:57 +0000 (05:57 +0000)
my testing, but documentation for g_static_mutex's isnt that great to
let us know what to do with a static mutex... considering it's...
static... pending respons from reporter for backport

SVN revision: 66360

legacy/ecore/ChangeLog
legacy/ecore/src/lib/ecore/ecore_glib.c

index 14a8850..d907eed 100644 (file)
 2011-12-16 Mike Blumenkrantz
 
         * Fix possible 0 byte allocation in ecore-x
+
+2011-12-20 Carsten Haitzler (The Rasterman)
+
+        * Fix probable leak for g_static_mutex's on some architectures
index 59673b9..7cea1c9 100644 (file)
@@ -190,7 +190,9 @@ _ecore_glib_select(int             ecore_fds,
    int ret;
 
    if (g_main_context_acquire(ctx))
-     g_mutex_lock(mutex);
+     {
+        if (mutex) g_mutex_lock(mutex);
+     }
    else
      {
         if (!_ecore_glib_cond)
@@ -203,8 +205,9 @@ _ecore_glib_select(int             ecore_fds,
    ret = _ecore_glib_select__locked
        (ctx, ecore_fds, rfds, wfds, efds, ecore_timeout);
 
-   g_mutex_unlock(mutex);
+   if (mutex) g_mutex_unlock(mutex);
    g_main_context_release(ctx);
+   g_static_mutex_free(&lock);
 
    return ret;
 }