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.hebbar@samsung.com>

Reviewers: cedric

Subscribers: cedric

Maniphest Tasks: T2372

Differential Revision: https://phab.enlightenment.org/D2445

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
Srivardhan Hebbar 2015-04-28 14:13:30 +02:00 committed by Cedric BAIL
parent fbc51e0432
commit 5af99bdc7a
1 changed files with 1 additions and 1 deletions

View File

@ -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);