mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-11 00:33:48 +01:00
Fix a memory leak
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
05c44474d1
commit
013ac1f4b4
@ -575,9 +575,10 @@ get_formatted_filename(zathura_t* zathura, const char* file_path, bool statusbar
|
||||
&& file_path_len >= home_len
|
||||
&& g_str_has_prefix(file_path, home)
|
||||
&& (!file_path[home_len] || file_path[home_len] == '/')) {
|
||||
|
||||
g_free(home);
|
||||
return g_strdup_printf("~%s", &file_path[home_len]);
|
||||
} else {
|
||||
g_free(home);
|
||||
return g_strdup(file_path);
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user