Ecore_Win32: do not allocate data as it is useless. Fix memory leak.
authorVincent Torri <vincent.torri@gmail.com>
Thu, 23 Jul 2015 15:47:28 +0000 (17:47 +0200)
committerTom Hacohen <tom@stosb.com>
Thu, 23 Jul 2015 15:51:06 +0000 (16:51 +0100)
@fix

src/lib/ecore_win32/ecore_win32.c

index 411c2f0..37b7956 100644 (file)
@@ -44,11 +44,11 @@ _ecore_win32_window_procedure(HWND   window,
                               WPARAM window_param,
                               LPARAM data_param)
 {
+   Ecore_Win32_Callback_Data  _data;
    Ecore_Win32_Callback_Data *data;
    DWORD                      coord;
 
-   data = (Ecore_Win32_Callback_Data *)malloc(sizeof(Ecore_Win32_Callback_Data));
-   if (!data) return DefWindowProc(window, message, window_param, data_param);
+   data = &_data;
 
    data->window = window;
    data->message = message;