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:
parent
ad7366994a
commit
b525befe67
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user