[Bug 5519] New: void "Gtk::*Store::set_value" have memory leak

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Tue Jun 30 18:08:16 CEST 2009


http://bugzilla.xfce.org/show_bug.cgi?id=5519

           Summary: void "Gtk::*Store::set_value" have memory leak
           Product: XFC
           Version: unspecified
          Platform: PC (x86)
               URL: http://www.hackyourmind.org/
        OS/Version: Linux
            Status: NEW
          Severity: critical
          Priority: High
         Component: libXFCui
        AssignedTo: xfc-bugs at xfce.org
        ReportedBy: wicker25 at gmail.com


void
Gtk::ListStore::set_value(const TreeIter& iter, int column, const char *str)
{
    G::Value value(gtk_list_store()->column_headers[column]);
    value.set(String(str));
    gtk_list_store_set_value(gtk_list_store(), iter, column,value.g_value());
}

The "GValue" struct does not properly deallocate.

Correct is:

void
Gtk::ListStore::set_value(const TreeIter& iter, int column, const char *str)
{
    G::Value value(gtk_list_store()->column_headers[column]);
    value.set(String(str));
    gtk_list_store_set_value(gtk_list_store(), iter, column,value.g_value());
    g_value_unset( value.g_value() );
    g_free( value.g_value() );
}

See other similar functions in ".inl" file .

-- 
Configure bugmail: http://bugzilla.xfce.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Xfc-bugs mailing list