elementary_test: Avoid a double free in box transition
authormike_m <mike_m@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 10 Jun 2011 06:03:52 +0000 (06:03 +0000)
committermike_m <mike_m@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 10 Jun 2011 06:03:52 +0000 (06:03 +0000)
 *** glibc detected *** elementary_test: double free or corruption (fasttop): 0x096aa5d0 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(+0x6b591)[0xd08591]
/lib/tls/i686/cmov/libc.so.6(+0x6cde8)[0xd09de8]
/lib/tls/i686/cmov/libc.so.6(cfree+0x6d)[0xd0cecd]
/usr/local/lib/libevas.so.1(evas_object_smart_callback_call+0x146)[0x37d4f6]
/usr/local/lib/libelementary-ver-pre-svn-09.so.0(+0xcf984)[0x287984]
/usr/local/lib/libecore_evas.so.1(+0x11457)[0x612457]
/usr/local/lib/libecore.so.1(_ecore_event_call+0x389)[0xe93399]
/usr/local/lib/libecore.so.1(+0xca05)[0xe97a05]

my prefix: /usr/local
elm test data in /usr/local/share/elementary
==18230== Invalid read of size 4
==18230==    at 0x80582D6: _win_del (test_box.c:203)
==18230==    by 0x42684F5: evas_object_smart_callback_call (evas_object_smart.c:409)
==18230==    by 0x4112983: _elm_win_delete_request (elm_win.c:624)
==18230==    by 0x4338456: _ecore_evas_x_event_window_delete_request (ecore_evas_x.c:1065)
==18230==    by 0x4307398: _ecore_event_call (ecore_events.c:641)
==18230==    by 0x430BA04: _ecore_main_gsource_dispatch (ecore_main.c:553)

git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@60174 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/bin/test_box.c

index 88e1588..b9bc893 100644 (file)
@@ -200,8 +200,10 @@ _win_del(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
 {
    Transitions_Data *tdata = data;
    if (!data) return;
+#if 0
    elm_box_layout_set(tdata->box, evas_object_box_layout_horizontal, NULL, NULL);
    free(tdata);
+#endif
 }
 
 void