Commit 0ed8dfdc authored by Victor Ananjevsky's avatar Victor Ananjevsky

don't manually allocate memory for realpath

parent 959bb99d
......@@ -48,8 +48,7 @@ load_uri (const gchar * uri)
addr = g_filename_to_uri (uri, NULL, NULL);
else
{
gchar *afn = g_new0 (gchar, PATH_MAX);
realpath (uri, afn);
gchar *afn = realpath (uri, NULL);
addr = g_filename_to_uri (afn, NULL, NULL);
g_free (afn);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment