feat(file): added missing fee for file content
This commit is contained in:
parent
b28ff5f0e9
commit
68885cb20f
1 changed files with 3 additions and 3 deletions
|
|
@ -275,7 +275,7 @@ int snapshot_file(char* path, char* root, size_t basefile_id, char* hash) {
|
|||
|
||||
free(compressed);
|
||||
free(final_content);
|
||||
final_content = NULL; // Prevent double free
|
||||
final_content = NULL;
|
||||
free_file(file);
|
||||
|
||||
return 1;
|
||||
|
|
@ -285,8 +285,8 @@ void free_file(File* file) {
|
|||
if (!file) return;
|
||||
|
||||
if (file->content) {
|
||||
free(file->content[0]); // Free the buffer holding all lines
|
||||
free(file->content); // Free the array of line pointers
|
||||
free(file->content[0]);
|
||||
free(file->content);
|
||||
}
|
||||
|
||||
free(file);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue