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 516103 - [PATCH] gnome-settings-daemon crashes when launched from GDM
[PATCH] gnome-settings-daemon crashes when launched from GDM
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: libgnome-desktop
2.21.x
Other FreeBSD
: Normal critical
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
: 516148 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-02-12 20:50 UTC by Joe Marcus Clarke
Modified: 2008-02-14 22:34 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Do not unref an NULL object (556 bytes, patch)
2008-02-12 20:51 UTC, Joe Marcus Clarke
committed Details | Review

Description Joe Marcus Clarke 2008-02-12 20:50:02 UTC
There is the potential to unref a NULL object in gnome-bg.c which will lead to a crash in gnome-settings-daemon.  Here is the backtrace:

# gdb /usr/local/libexec/gnome-settings-daemon /var/gdm/gnome-settings-daem.core

warning: core file may not match specified executable file.
Core was generated by `gnome-settings-daem'.
Program terminated with signal 5, Trace/breakpoint trap.

  • #0 IA__g_logv
    at gmessages.c line 503
  • #0 IA__g_logv
    at gmessages.c line 503
  • #1 IA__g_log
    at gmessages.c line 517
  • #2 IA__g_return_if_fail_warning
  • #3 IA__g_object_unref
    at gobject.c line 1742
  • #4 get_mtime
    at gnome-bg.c line 1082
  • #5 get_pixbuf
    at gnome-bg.c line 1211
  • #6 gnome_bg_create_pixmap
    at gnome-bg.c line 418
  • #7 apply_prefs
    at gsd-background-manager.c line 227
  • #8 gsd_background_manager_start
    at gsd-background-manager.c line 288
  • #9 impl_activate
    at gsd-background-plugin.c line 78
  • #10 gnome_settings_plugins_engine_activate_plugin
  • #11 activate_plugin
    at gnome-settings-plugins-engine.c line 244
  • #12 IA__g_slist_foreach
    at gslist.c line 468
  • #13 gnome_settings_plugins_engine_init
    at gnome-settings-plugins-engine.c line 346
  • #14 gnome_settings_manager_start
    at gnome-settings-manager.c line 106
  • #15 main
    at main.c line 221

Attached is a patch to fix this by checking to see if info is NULL before unrefing it.
Comment 1 Joe Marcus Clarke 2008-02-12 20:51:01 UTC
Created attachment 105087 [details] [review]
Do not unref an NULL object
Comment 2 Vincent Untz 2008-02-13 08:17:43 UTC
Thanks.
Comment 3 Vincent Untz 2008-02-14 22:34:30 UTC
*** Bug 516148 has been marked as a duplicate of this bug. ***