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 598278 - Memory leak
Memory leak
Status: RESOLVED FIXED
Product: gnome-commander
Classification: Other
Component: application
1.2.x
Other Linux
: Normal normal
: 1.2.9
Assigned To: epiotr
epiotr
Depends on:
Blocks:
 
 
Reported: 2009-10-13 13:48 UTC by Dominique Leuenberger
Modified: 2009-10-17 18:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dominique Leuenberger 2009-10-13 13:48:37 UTC
Ticket forwarded from downstream: https://bugzilla.novell.com/show_bug.cgi?id=546496

<quote who="David Binderman">
I just had a look at factory package gnome-commander-1.2.8.2-1.1
source code file gnome-commander-1.2.8.2/src/gnome-cmd-dir-indicator.cc
function on_dir_indicator_clicked

I notice the following code

        gchar *chTo = g_strdup(labelText);
        gint x = (gint) event->x;

        for (gint i = 0; i < indicator->priv->numPositions; i++)
            if (x < indicator->priv->slashPixelPosition[i])
            {
                strncpy (chTo, labelText,
indicator->priv->slashCharPosition[i]);
                chTo[indicator->priv->slashCharPosition[i]] = 0x0;
                gnome_cmd_main_win_switch_fs (main_win, fs);
                fs->goto_directory(chTo);
                g_free (chTo);
                return TRUE;
            }

        // pointer is after directory name - just return
        return TRUE;

so if the final return is taken, then chTo is a memory leak. Suggest add
call to free( chTo) just before final return.
</quote>
Comment 1 epiotr 2009-10-17 18:10:24 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.