Now that we have a function that takes care of free'ing that structure
we should use it.
---
 plugins/phonesim.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/plugins/phonesim.c b/plugins/phonesim.c
index 9210e02..a9b77b9 100644
--- a/plugins/phonesim.c
+++ b/plugins/phonesim.c
@@ -885,8 +885,7 @@ static void slc_failed(gpointer userdata)
 
        ofono_modem_set_powered(modem, FALSE);
 
-       g_at_chat_unref(info->chat);
-       info->chat = NULL;
+       hfp_slc_info_free(info);
 }
 
 static int localhfp_enable(struct ofono_modem *modem)
@@ -940,8 +939,7 @@ static int localhfp_disable(struct ofono_modem *modem)
 {
        struct hfp_slc_info *info = ofono_modem_get_data(modem);
 
-       g_at_chat_unref(info->chat);
-       info->chat = NULL;
+       hfp_slc_info_free(info);
 
        return 0;
 }
-- 
1.8.1.1

_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to