1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Allocate memory for realpath in both cases

Forgot about that :(
This commit is contained in:
Michael Vetter 2020-12-09 16:22:06 +01:00
parent ad7366994a
commit b525befe67

View File

@ -653,7 +653,7 @@ unique_filename_from_url(const char* url, const char* path)
// Default to './' as path when none has been provided. // Default to './' as path when none has been provided.
if (path == NULL) { if (path == NULL) {
realpath = "./"; realpath = strdup("./");
} else { } else {
realpath = get_expanded_path(path); realpath = get_expanded_path(path);
} }