Bug#289384: gnome-system-monitor: patch for the segfault

Jaka Mocnik Jaka Mocnik <jaka@gnu.org>, 289384@bugs.debian.org
Thu, 17 Feb 2005 23:17:53 +0100


This is a multi-part MIME message sent by reportbug.

--===============3936629018622487942==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: gnome-system-monitor
Version: 2.8.1-1
Followup-For: Bug #289384

I noticed this is fixed in upstream CVS HEAD, destined for Gnome 2.10.
It would be nice of the upstream author to fix it in 2.8 branch. In the
meanwhile, here is a patch that fixes the bug for 2.8.1...

-- System Information:
Debian Release: 3.1
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.9
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages gnome-system-monitor depends on:
ii  libart-2.0-2   2.3.17-1                  Library of functions for 2D graphi
ii  libatk1.0-0    1.8.0-4                   The ATK accessibility toolkit
ii  libbonobo2-0   2.8.1-1                   Bonobo CORBA interfaces library
ii  libbonoboui2-0 2.8.1-1                   The Bonobo UI library
ii  libc6          2.3.2.ds1-20.0.0.1.pure64 GNU C Library: Shared libraries an
ii  libgconf2-4    2.8.1-4                   GNOME configuration database syste
ii  libglib2.0-0   2.6.2-1                   The GLib library of C routines
ii  libgnome2-0    2.8.0-6                   The GNOME 2 library - runtime file
ii  libgnomecanvas 2.8.0-1                   A powerful object-oriented display
ii  libgnomeui-0   2.8.0-3                   The GNOME 2 libraries (User Interf
ii  libgnomevfs2-0 2.8.3-11                  The GNOME virtual file-system libr
ii  libgtk2.0-0    2.6.2-3                   The GTK+ graphical user interface 
ii  libgtop2-2     2.6.0-4                   Libraries for gtop system monitori
ii  libice6        4.3.0.dfsg.1-11           Inter-Client Exchange library
ii  liborbit2      1:2.10.5-0.1              libraries for ORBit2 - a CORBA ORB
ii  libpango1.0-0  1.8.0-3                   Layout and rendering of internatio
ii  libpopt0       1.7-5                     lib for parsing cmdline parameters
ii  libsm6         4.3.0.dfsg.1-11           X Window System Session Management
ii  libwnck4       2.8.1-3                   Window Navigator Construction Kit 
ii  libxml2        2.6.16-2                  GNOME XML library
ii  scrollkeeper   0.3.14-9.1                A free electronic cataloging syste
ii  xlibs          4.3.0.dfsg.1-11           X Keyboard Extension (XKB) configu
ii  zlib1g         1:1.2.2-4                 compression library - runtime

-- no debconf information

--===============3936629018622487942==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="procman-2.8.1.diff"

--- callbacks.c.orig	2005-02-17 23:05:41.693023585 +0100
+++ callbacks.c	2005-02-17 23:05:46.892962375 +0100
@@ -595,6 +595,7 @@
 
 	monitor = gnome_vfs_get_volume_monitor();
 	volume = gnome_vfs_volume_monitor_get_volume_for_path(monitor, mountpoint);
+	if(!volume) return NULL;
 	i_type = gnome_vfs_volume_get_icon(volume);
 	gnome_vfs_volume_unref(volume);
 
@@ -677,7 +678,8 @@
 	g_free (text[3]);
 	g_free (text[4]);
 
-	g_object_unref (pixbuf);
+	if(pixbuf)
+		g_object_unref (pixbuf);
 	g_object_unref (icontheme);
 }
 

--===============3936629018622487942==--