summaryrefslogtreecommitdiff
path: root/src/sim-auth.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2018-02-28 11:21:45 -0600
committerDenis Kenzior <denkenz@gmail.com>2018-02-28 11:21:45 -0600
commitdc59351de61f5b61a8e687448586349f3f4b780a (patch)
tree9883d62b3aa17c93e85abe1d8858a51b8841b719 /src/sim-auth.c
parent497e38f237167f1cede15120024cfb4647ad4d06 (diff)
downloadofono-dc59351de61f5b61a8e687448586349f3f4b780a.tar.gz
sim-auth: Do not leak nai
==31530== 88 bytes in 2 blocks are definitely lost in loss record 132 of 186 ==31530== at 0x4C2BF8F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==31530== by 0x5847B97: vasprintf (in /lib64/libc-2.23.so) ==31530== by 0x510AE38: g_vasprintf (gprintf.c:316) ==31530== by 0x50D8BDF: g_strdup_vprintf (gstrfuncs.c:514) ==31530== by 0x50D8CAA: g_strdup_printf (gstrfuncs.c:540) ==31530== by 0x4F706B: build_nai (sim-auth.c:660) ==31530== by 0x4F706B: sim_auth_register (sim-auth.c:738) ==31530== by 0x4F706B: ofono_sim_auth_create (sim-auth.c:768) ==31530== by 0x4ACBB4: modem_change_state (modem.c:525) ==31530== by 0x4AD0CD: sim_state_watch.part.5 (modem.c:720) ==31530== by 0x4CF6D0: call_state_watches (sim.c:366) ==31530== by 0x4CF6D0: sim_set_ready (sim.c:1475) ==31530== by 0x4CF6D0: sim_imsi_obtained (sim.c:1577) ==31530== by 0x45D868: at_cimi_cb (sim.c:453) ==31530== by 0x49CB5F: at_chat_finish_command (gatchat.c:459) ==31530== by 0x49DAC7: at_chat_handle_command_response (gatchat.c:521) ==31530== by 0x49DAC7: have_line (gatchat.c:600) ==31530== by 0x49DAC7: new_bytes (gatchat.c:759)
Diffstat (limited to 'src/sim-auth.c')
-rw-r--r--src/sim-auth.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sim-auth.c b/src/sim-auth.c
index 7b657387..e014feef 100644
--- a/src/sim-auth.c
+++ b/src/sim-auth.c
@@ -139,6 +139,7 @@ static void sim_auth_unregister(struct ofono_atom *atom)
struct ofono_sim_auth *sa = __ofono_atom_get_data(atom);
free_apps(sa);
+ g_free(sa->nai);
g_free(sa->pending);
}