From: Vinicius Costa Gomes <[email protected]>

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 8631039..63590a9 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)
@@ -944,8 +943,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.7.11.7

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

Reply via email to