After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 350436 - double free
double free
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-manager
SVN TRUNK
Other Linux
: Normal normal
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
: 350751 350817 351837 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-08-08 14:21 UTC by William Jon McCann
Modified: 2006-08-17 21:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.74 KB, patch)
2006-08-08 14:39 UTC, William Jon McCann
none Details | Review

Description William Jon McCann 2006-08-08 14:21:43 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]
Comment 1 William Jon McCann 2006-08-08 14:39:58 UTC
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.
Comment 2 Richard Hughes 2006-08-08 17:37:58 UTC
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
Comment 3 William Jon McCann 2006-08-10 15:03:33 UTC
*** Bug 350751 has been marked as a duplicate of this bug. ***
Comment 4 William Jon McCann 2006-08-11 00:08:08 UTC
*** Bug 350817 has been marked as a duplicate of this bug. ***
Comment 5 Richard Hughes 2006-08-17 21:58:04 UTC
*** Bug 351837 has been marked as a duplicate of this bug. ***