GNOME Bugzilla – Bug 360736
crash due to incorrect free call
Last modified: 2006-10-10 10:46:30 UTC
That crash has been mentionned on https://launchpad.net/distros/ubuntu/+source/vino/+bug/64461 Steps to get the issue: * open vino-preferences dialog * change the password * close the dialog and open it again * unset the preference to share the desktop Log from valgrind: "==2515== Invalid free() / delete / delete[] ==2515== at 0x4A20423: free (vg_replace_malloc.c:233) ==2515== by 0x40AE9B: vino_prefs_vnc_password_changed (vino-prefs.c:226) ==2515== by 0x56C019C: notify_listeners_callback (gconf-client.c:2384) ==2515== by 0x56ABE10: notify_listener_list (gconf-listeners.c:589) ==2515== by 0x56AC010: ltable_notify (gconf-listeners.c:655) ==2515== by 0x56AB406: gconf_listeners_notify (gconf-listeners.c:184) ==2515== by 0x56C0225: notify_one_entry (gconf-client.c:2409) ==2515== by 0x56C0305: gconf_client_flush_notifies (gconf-client.c:2449) ==2515== by 0x56BFFB0: notify_idle_callback (gconf-client.c:2343) ==2515== by 0x5DD1C83: g_main_context_dispatch (gmain.c:2045) ==2515== by 0x5DD4ACC: g_main_context_iterate (gmain.c:2677) ==2515== by 0x5DD4DD9: g_main_loop_run (gmain.c:2881) ==2515== Address 0xA914728 is 0 bytes inside a block of size 13 free'd ==2515== at 0x4A20423: free (vg_replace_malloc.c:233) ==2515== by 0x40B10A: vino_prefs_init (vino-prefs.c:309) ==2515== by 0x40A4B6: main (vino-main.c:85)"
Created attachment 74313 [details] [review] fixes the issue vino_vnc_password is not set to NULL after being freed so it can be freed again. The patch also drops not required if calls since g_free(var) does nothing when var = NULL
I just reverted the broken leak fix I introduced.
what was wrong about the patch?