memory leak in nm_gconf_migrate_0_7_ca_cert_ignore
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
network-manager-applet (Ubuntu) |
Fix Released
|
High
|
Mathieu Trudel-Lapierre |
Bug Description
at line 1879 (with the quilt patchset applied), nm_gconf_
if (!nm_gconf_
This memory is never freed. I believe the correct deallocation function here is g_free, because the allocation is done using g_strdup. Here is a valgrind log.
==10301== 333 bytes in 9 blocks are definitely lost in loss record 8,678 of 9,326
==10301== at 0x4C28FAC: malloc (vg_replace_
==10301== by 0x8F62A62: g_malloc (gmem.c:164)
==10301== by 0x8F7B06D: g_strdup (gstrfuncs.c:102)
==10301== by 0x43AF42: nm_gconf_
==10301== by 0x443C83: nm_gconf_
==10301== by 0x43F85A: nm_gconf_
==10301== by 0x4465A5: read_connections (nma-gconf-
==10301== by 0x44665E: list_connections (nma-gconf-
==10301== by 0x52701D1: impl_settings_
==10301== by 0x526FEBB: dbus_glib_
==10301== by 0x6584C4C: ??? (in /usr/lib/
==10301== by 0x8475A00: _dbus_object_
==10301== by 0x8467B0F: dbus_connection
==10301== by 0x6582654: ??? (in /usr/lib/
==10301== by 0x8F5BBCC: g_main_
==10301== by 0x8F5C3A7: g_main_
==10301== by 0x8F5C9F1: g_main_loop_run (gmain.c:3299)
==10301== by 0x416D77: main (main.c:101)
I think the correct place to call g_free is at the very end of the block in which uuid is declared, but care must be taken that early outs are not introduced later. It would probably be a good idea to document the code block's responsibility to free the uuid.
Related branches
Changed in network-manager-applet (Ubuntu): | |
status: | Fix Committed → In Progress |
importance: | Undecided → High |
assignee: | nobody → Mathieu Trudel-Lapierre (mathieu-tl) |
This one was already fixed upstream.
http:// git.gnome. org/browse/ network- manager- applet/ commit/ src/gconf- helpers/ gconf-upgrade. c?id=f176a7ae21 9636681591fa7a7 aff15314ad16405