GNOME Bugzilla – Bug 598278
Memory leak
Last modified: 2009-10-17 18:10:24 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>
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.