From e916acc3534c439e4a6b5e07508c0288ca229a57 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 12 Aug 2010 23:40:47 -0500 Subject: [PATCH] nwemodem: Use g_at_chat_clone --- drivers/nwmodem/radio-settings.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/nwmodem/radio-settings.c b/drivers/nwmodem/radio-settings.c index 2883630..64ceaf3 100644 --- a/drivers/nwmodem/radio-settings.c +++ b/drivers/nwmodem/radio-settings.c @@ -170,7 +170,7 @@ static int nw_radio_settings_probe(struct ofono_radio_settings *rs, if (!rsd) return -ENOMEM; - rsd->chat = chat; + rsd->chat = g_at_chat_clone(chat); ofono_radio_settings_set_data(rs, rsd); @@ -185,6 +185,8 @@ static void nw_radio_settings_remove(struct ofono_radio_settings *rs) struct radio_settings_data *rsd = ofono_radio_settings_get_data(rs); ofono_radio_settings_set_data(rs, NULL); + + g_at_chat_unref(rsd->chat); g_free(rsd); } -- 2.7.4