about summary refs log tree commit diff stats
path: root/src/common.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-12-09 16:22:06 +0100
committerMichael Vetter <jubalh@iodoru.org>2020-12-09 16:22:06 +0100
commitb525befe67dbb8a8188033c4f33b57c46272f9f6 (patch)
treebb7eeff0b05a3aedd54ea8de93279067a5b0299f /src/common.c
parentad7366994a10f61c7ac99f78c5d9ce2ea841f8e4 (diff)
downloadprofani-tty-b525befe67dbb8a8188033c4f33b57c46272f9f6.tar.gz
Allocate memory for realpath in both cases
Forgot about that :(
Diffstat (limited to 'src/common.c')
-rw-r--r--src/common.c2
1 files changed, 1 insertions, 1 deletions
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);
     }