nwemodem: Use g_at_chat_clone

This commit is contained in:
Denis Kenzior 2010-08-12 23:40:47 -05:00
parent de94bf4082
commit e916acc353
1 changed files with 3 additions and 1 deletions

View File

@ -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);
}