summaryrefslogtreecommitdiff
path: root/drivers/nwmodem
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-08-12 23:40:47 -0500
committerDenis Kenzior <denkenz@gmail.com>2010-08-12 23:40:47 -0500
commite916acc3534c439e4a6b5e07508c0288ca229a57 (patch)
tree2adba24362832052c252b2a86ddda59e6375eb16 /drivers/nwmodem
parentde94bf408225f72a2455f51a86db7077b5f1bf6c (diff)
downloadofono-e916acc3534c439e4a6b5e07508c0288ca229a57.tar.gz
nwemodem: Use g_at_chat_clone
Diffstat (limited to 'drivers/nwmodem')
-rw-r--r--drivers/nwmodem/radio-settings.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/nwmodem/radio-settings.c b/drivers/nwmodem/radio-settings.c
index 28836308..64ceaf34 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);
}