1
0
Fork 0

[terminal] Make a copy of filename for hash

This commit is contained in:
Witold Filipczyk 2023-11-26 19:00:04 +01:00
parent 49285684ea
commit db99981ec5
1 changed files with 5 additions and 1 deletions

View File

@ -97,7 +97,11 @@ save_temporary_filename(const char *filename)
}
if (temporary_files) {
add_hash_item(temporary_files, filename, strlen(filename), NULL);
char *copy = stracpy(filename);
if (copy) {
add_hash_item(temporary_files, copy, strlen(copy), NULL);
}
}
}