diff options
-rw-r--r-- | xombrero.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xombrero.c b/xombrero.c index ab03aef..f5d55bc 100644 --- a/xombrero.c +++ b/xombrero.c @@ -790,9 +790,10 @@ guess_url_type(char *url_in) if (getcwd(cwd, PATH_MAX) != NULL) path = g_strdup_printf("%s" PS "%s", cwd, url_in); - url_out = g_filename_to_uri(path, NULL, NULL); + url_out = g_filename_to_uri(path, NULL, NULL); free(cwd); - free(path); + if (path) + free(path); } } else url_out = g_strdup_printf("http://%s", url_in); /* guess http */ |