GNOME Bugzilla – Bug 350436
double free
Last modified: 2006-08-17 21:58:04 UTC
[power_button_pressed_cb] gpm-manager.c:1708 (10:10:13): Button press event type=lid state=1 [gpm_screensaver_poke] gpm-screensaver.c:406 (10:10:13): poke [lid_button_pressed] gpm-manager.c:1628 (10:10:13): duplicate lid change event [gpm_screensaver_auth_begin] gpm-screensaver.c:79 (10:10:13): emitting auth-request : (1) *** WARNING *** [screensaver_auth_request_cb] gpm-manager.c:2602 (10:10:13): Failed to turn on DPMS: PQR�T$�D$ �+���ZY�$� *** glibc detected *** gnome-power-manager: double free or corruption (out): 0x00ad1ac0 *** ======= Backtrace: ========= /lib/libc.so.6[0x18fcf18] /lib/libc.so.6(__libc_free+0x78)[0x19003ef] /opt/gnome/lib/libglib-2.0.so.0(g_free+0x31)[0xe50941] /opt/gnome/lib/libglib-2.0.so.0(g_error_free+0x29)[0xe3af29] gnome-power-manager[0x8055253] /opt/gnome/lib/libgobject-2.0.so.0(g_cclosure_marshal_VOID__BOOLEAN+0x63)[0xb5f5f3] /opt/gnome/lib/libgobject-2.0.so.0(g_closure_invoke+0x12b)[0xb50f4b] /opt/gnome/lib/libgobject-2.0.so.0[0xb6260b] /opt/gnome/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x823)[0xb63a83] /opt/gnome/lib/libgobject-2.0.so.0(g_signal_emit+0x29)[0xb63d29] gnome-power-manager[0x8061066] /opt/gnome/lib/libgobject-2.0.so.0(g_cclosure_marshal_VOID__VOID+0x49)[0xb5e759] /opt/gnome/lib/libdbus-glib-1.so.2[0x78a9b6] /opt/gnome/lib/libgobject-2.0.so.0(g_closure_invoke+0x12b)[0xb50f4b] /opt/gnome/lib/libgobject-2.0.so.0[0xb6260b] /opt/gnome/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x823)[0xb63a83] /opt/gnome/lib/libgobject-2.0.so.0(g_signal_emit+0x29)[0xb63d29] /opt/gnome/lib/libdbus-glib-1.so.2[0x78b85b] /opt/gnome/lib/libdbus-1.so.2(dbus_connection_dispatch+0x78a)[0xb9632a] /opt/gnome/lib/libdbus-glib-1.so.2[0x7821ed] /opt/gnome/lib/libglib-2.0.so.0(g_main_context_dispatch+0x182)[0xe49632] /opt/gnome/lib/libglib-2.0.so.0[0xe4c5ff] /opt/gnome/lib/libglib-2.0.so.0(g_main_loop_run+0x1a9)[0xe4c9a9] gnome-power-manager[0x8051b78] /lib/libc.so.6(__libc_start_main+0xdc)[0x18ae724]
Created attachment 70490 [details] [review] patch This should fix the crash. It does two things: 1. Initialize the error 2. Check the return code of gpm_dpms_set_mode The second change is just so that the logic is more clear. Checking that error is not NULL is implicitly checking the return value of the function provided that the error value is always set. The error value should always be set when the function returns FALSE but this way we can test that.
Sorry, my brain has not been working the last few days: 2006-08-08 Richard Hughes <richard@hughsie.com> * TODO: Re-organize, and add a note about a GError audit. * src/gpm-manager.c: (screensaver_auth_request_cb): Apply a patch from William Jon McCann to fix a double free on the new smartcard code. Many thanks. #350436
*** Bug 350751 has been marked as a duplicate of this bug. ***
*** Bug 350817 has been marked as a duplicate of this bug. ***
*** Bug 351837 has been marked as a duplicate of this bug. ***