Ecore exe win32: Fix double-free errors.
authorTom Hacohen <tom@stosb.com>
Tue, 13 Oct 2015 13:31:29 +0000 (14:31 +0100)
committerTom Hacohen <tom@stosb.com>
Tue, 13 Oct 2015 13:41:57 +0000 (14:41 +0100)
As reported by vtorri, sometimes ecore_exe on win32 will encounter double
free issues. This was because the variable was freed, but not set to NULL
as expected by the cleanup function.

Fixes T2675

@fix

src/lib/ecore/ecore_exe_win32.c

index 04326b0..804a653 100644 (file)
@@ -90,6 +90,7 @@ _ecore_exe_close_cb(void *data,
    e->exited = 1;
    e->pid = exe->pid;
    e->exe = obj;
+   exe->h_close = NULL; // It's going to get deleted in the next callback.
 
    ecore_event_add(ECORE_EXE_EVENT_DEL, e,
                    _ecore_exe_event_del_free, NULL);