From 0c1f8003af1f9057ccca1ad6d49931f66bd6b7f8 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 9 Sep 2009 21:24:13 -0500 Subject: [PATCH] Fix memory leak --- plugins/phonesim.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/phonesim.c b/plugins/phonesim.c index d5e6bbed..fb82ecdd 100644 --- a/plugins/phonesim.c +++ b/plugins/phonesim.c @@ -83,6 +83,7 @@ static void phonesim_remove(struct ofono_modem *modem) DBG("%p", modem); + g_free(data); ofono_modem_set_data(modem, NULL); g_free(data); @@ -204,8 +205,6 @@ static int phonesim_disable(struct ofono_modem *modem) DBG("%p", modem); - ofono_modem_set_data(modem, NULL); - g_at_chat_shutdown(data->chat); g_at_chat_unref(data->chat);