From b525befe67dbb8a8188033c4f33b57c46272f9f6 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Wed, 9 Dec 2020 16:22:06 +0100 Subject: Allocate memory for realpath in both cases Forgot about that :( --- src/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/common.c b/src/common.c index 327b3586..8dbf1619 100644 --- a/src/common.c +++ b/src/common.c @@ -653,7 +653,7 @@ unique_filename_from_url(const char* url, const char* path) // Default to './' as path when none has been provided. if (path == NULL) { - realpath = "./"; + realpath = strdup("./"); } else { realpath = get_expanded_path(path); } -- cgit 1.4.1-2-gfad0