From 53e575bd5c0817029e756fe386632255ea0a4855 Mon Sep 17 00:00:00 2001 From: Aki Niemi Date: Sat, 22 Aug 2009 18:00:58 +0300 Subject: [PATCH] Fix memory leak in isimodem.c --- drivers/isimodem/isimodem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/isimodem/isimodem.c b/drivers/isimodem/isimodem.c index fc132be..c5dce39 100644 --- a/drivers/isimodem/isimodem.c +++ b/drivers/isimodem/isimodem.c @@ -110,6 +110,7 @@ static void netlink_status_cb(bool up, uint8_t addr, GIsiModem *idx, ofono_modem_remove(isi->modem); g_modems = g_slist_remove(g_modems, isi); + g_free(isi); } } @@ -172,11 +173,11 @@ static void isimodem_exit(void) struct isi_data *isi = m->data; ofono_modem_remove(isi->modem); - g_free(isi); } g_slist_free(g_modems); + g_modems = NULL; if (link) { g_pn_netlink_stop(link); -- 2.7.4