[Xfce4-commits] r17468 - xfce-mcs-plugins/trunk/plugins/shortcuts_plugin

Benedikt Meurer benedikt.meurer at unix-ag.uni-siegen.de
Thu Sep 8 13:49:15 CEST 2005


Wauthy Jean-François wrote:
> +  /* check XDG_CONFIG_HOME/xfce4/shortcuts/ exists; if not it creates it */
> +  xfce_resource_save_location (XFCE_RESOURCE_CONFIG, "xfce4/shortcuts/", TRUE);

This leaks memory. I'd suggest:

gchar *path;
...
path = xfce_resource_save_location (...);
if (G_UNLIKELY (path == NULL))
  {
    g_warning ("Failed to create shortcuts path, idiot...");
  }
g_free (path);

well, maybe w/o the "idiot". ;-)

Benedikt



More information about the Xfce4-dev mailing list