ecore: directly allocating and freeing Ecore_Win32_Handler variable.
authormichelle legrand <michelle.legrand@openwide.fr>
Wed, 4 Feb 2015 11:01:36 +0000 (12:01 +0100)
committerCedric BAIL <cedric@osg.samsung.com>
Wed, 11 Feb 2015 16:03:37 +0000 (17:03 +0100)
There was no memory pool nor any function like that in fact.

@fix

src/lib/ecore/ecore_main.c

index de84e61..98e56ff 100644 (file)
@@ -1150,7 +1150,7 @@ ecore_main_win32_handler_add(void                 *h,
    EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
    if (!h || !func) return NULL;
 
-   wh = ecore_win32_handler_calloc(1);
+   wh = calloc(1, sizeof(Ecore_Win32_Handler));
    if (!wh) return NULL;
    ECORE_MAGIC_SET(wh, ECORE_MAGIC_WIN32_HANDLER);
    wh->h = (HANDLE)h;
@@ -1356,7 +1356,7 @@ _ecore_main_shutdown(void)
         win32_handlers = (Ecore_Win32_Handler *)eina_inlist_remove(EINA_INLIST_GET(win32_handlers),
                                                                    EINA_INLIST_GET(wh));
         ECORE_MAGIC_SET(wh, ECORE_MAGIC_NONE);
-        ecore_win32_handler_mp_free(wh);
+        free(wh);
      }
    win32_handlers_delete_me = EINA_FALSE;
    win32_handler_current = NULL;
@@ -1659,7 +1659,7 @@ _ecore_main_win32_handlers_cleanup(void)
                eina_inlist_remove(EINA_INLIST_GET(win32_handlers),
                                   EINA_INLIST_GET(wh));
              ECORE_MAGIC_SET(wh, ECORE_MAGIC_NONE);
-             ecore_win32_handler_mp_free(wh);
+             free(wh);
           }
      }
    if (!deleted_in_use) win32_handlers_delete_me = EINA_FALSE;