feat(file): added missing fee for file content

This commit is contained in:
lisk77 2025-09-10 23:14:01 +02:00
parent b28ff5f0e9
commit 68885cb20f

View file

@ -275,7 +275,7 @@ int snapshot_file(char* path, char* root, size_t basefile_id, char* hash) {
free(compressed); free(compressed);
free(final_content); free(final_content);
final_content = NULL; // Prevent double free final_content = NULL;
free_file(file); free_file(file);
return 1; return 1;
@ -285,8 +285,8 @@ void free_file(File* file) {
if (!file) return; if (!file) return;
if (file->content) { if (file->content) {
free(file->content[0]); // Free the buffer holding all lines free(file->content[0]);
free(file->content); // Free the array of line pointers free(file->content);
} }
free(file); free(file);