summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kenzior <denis.kenzior@intel.com>2009-09-09 21:24:13 -0500
committerDenis Kenzior <denkenz@gmail.com>2009-09-10 16:13:15 -0500
commit0c1f8003af1f9057ccca1ad6d49931f66bd6b7f8 (patch)
tree2d459f1e1b6a4cac6e2d39ba67789578e65a133b
parentac4c183a019eb7b0f6f3882bcafe8726b7dc8dfb (diff)
downloadofono-0c1f8003af1f9057ccca1ad6d49931f66bd6b7f8.tar.bz2
Fix memory leak
-rw-r--r--plugins/phonesim.c3
1 files changed, 1 insertions, 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);