smproxy/save.c



Hi.

There's a leak in WriteProxyFile() in smproxy/save.c

    const gchar *path;
    ...
    ...

    path = getenv ("SM_SAVE_DIR");
    if (!path)
      path = gnome_util_home_file (NULL); (needs to be freed)
    if (!path)
      path = g_get_home_dir ();
    if (!path)
      path = getenv ("HOME");
    if (!path)
      path = ".";

But I can't see how to sanely free this without redoing the whole
function since it's assigned using different methods where some allocate
new memory and others don't and the variable is declared as const so the
compiler will complain loudly if you try to free it...

Is this piece of code worth bothering to fix? It seems FC3 doesn't even
use the session proxy at all. I don't have any ~/.gnome2/.gnome-smproxy-
* files at least...

Cheers
Kjartan





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]