cicku / libproxy

Automatically exported from code.google.com/p/libproxy
GNU Lesser General Public License v2.1
1 stars 0 forks source link

Crash in pxgsettings when trying to free 'client' object #192

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This started happening recently in Ubuntu. I think it probably coincides with 
our updating to GLib 2.37.0.

It's on Launchpad as 
https://bugs.launchpad.net/ubuntu/+source/libproxy/+bug/1182043

To reproduce:

$ /usr/lib/libproxy/0.4.7/pxgsettings org.gnome.system.proxy 
org.gnome.system.proxy.http org.gnome.system.proxy.https 
org.gnome.system.proxy.ftp org.gnome.system.proxy.socks
<press enter>
[1]    5458 segmentation fault (core dumped)  
/usr/lib/libproxy/0.4.7/pxgsettings org.gnome.system.proxy  

Program received signal SIGSEGV, Segmentation fault.
g_type_check_instance_cast (type_instance=0x613660, iface_type=80)
    at /build/buildd/glib2.0-2.37.0/./gobject/gtype.c:4008
4008    /build/buildd/glib2.0-2.37.0/./gobject/gtype.c: No such file or directory.
(gdb) bt full
#0  g_type_check_instance_cast (type_instance=0x613660, iface_type=80)
    at /build/buildd/glib2.0-2.37.0/./gobject/gtype.c:4008
        is_instantiatable = <optimised out>
        check = <optimised out>
#1  0x0000000000401517 in main (argc=6, argv=0x7fffffffd9a8)
    at /home/laney/temp/libproxy-0.4.11/libproxy/modules/pxgsettings.cpp:160
        inchan = 0x60e060
        outchan = 0x60e100
        client = 0x613660

I'm not sure what the loop is trying to achieve there—shouldn't you just 
g_object_unref and be done?

I also noticed that a small memory leak could be avoided if you g_strfreev 
(keys) after you're finished with it.

Original issue reported on code.google.com by i...@orangesquash.org.uk on 21 May 2013 at 9:57

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r876.

Original comment by dominiqu...@gmail.com on 26 Aug 2013 at 6:00