cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5af99bdc7a3fdd71466e11eea6f21c1ca9c1d386

commit 5af99bdc7a3fdd71466e11eea6f21c1ca9c1d386
Author: Srivardhan Hebbar <sri.heb...@samsung.com>
Date:   Tue Apr 28 14:13:30 2015 +0200

    ecore_con: fix double free issue in ecore_con_eet.
    
    Summary:
    While creating ecore_con_eet_server, if client is not set to false, then 
while deleting, it is checking for client and it is by default not false. So 
set it.
    ecore_con_reply object is being deleted twice. So removed code to delete 
the reply object as it would be deleted after the callback.
    
    Signed-off-by: Srivardhan Hebbar <sri.heb...@samsung.com>
    
    Reviewers: cedric
    
    Subscribers: cedric
    
    Maniphest Tasks: T2372
    
    Differential Revision: https://phab.enlightenment.org/D2445
    
    Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/ecore_con/ecore_con_eet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ecore_con/ecore_con_eet.c 
b/src/lib/ecore_con/ecore_con_eet.c
index c6195b5..eb335ce 100644
--- a/src/lib/ecore_con/ecore_con_eet.c
+++ b/src/lib/ecore_con/ecore_con_eet.c
@@ -452,6 +452,7 @@ ecore_con_eet_server_new(Ecore_Con_Server *server)
    r = calloc(1, sizeof (Ecore_Con_Eet));
    if (!r) return NULL;
 
+   r->client = EINA_FALSE;
    r->server = server;
    r->handler_add = ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_ADD,
                                             
(Ecore_Event_Handler_Cb)_ecore_con_eet_server_connected, r);
@@ -511,7 +512,6 @@ ecore_con_eet_server_free(Ecore_Con_Eet *r)
           {
              _ecore_con_eet_reply_cleanup(r->u.client.r);
              eet_connection_close(r->u.client.r->econn, NULL);
-             free(r->u.client.r);
           }
         EINA_LIST_FREE(r->u.client.server_connect_callbacks, s)
           free(s);

-- 


Reply via email to