Skip to content

Commit

Permalink
sim-auth: Do not leak nai
Browse files Browse the repository at this point in the history
==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)
  • Loading branch information
denkenz authored and monich committed Feb 5, 2020
1 parent f597119 commit 1c1e4fa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ofono/src/sim-auth.c
Expand Up @@ -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);
}
Expand Down

0 comments on commit 1c1e4fa

Please sign in to comment.