double free fix

This commit is contained in:
nova
2026-06-23 22:16:32 +02:00
parent cebacc7017
commit 18705b01c4
2 changed files with 1 additions and 3 deletions
+1 -2
View File
@@ -22,7 +22,7 @@ void images_clear();
char* generic(file *f); char* generic(file *f);
char* get_mimetype(file *f){ char* get_mimetype(file *f){
char *mime = (char*)magic_file(cookie_type, f->file_name); char *mime = (char*)magic_file(cookie_type, f->file_name); /*freeing this causes th to crash*/
return mime; return mime;
} }
@@ -52,7 +52,6 @@ char* preview_file(file *f){
file_buffer = generic(f); file_buffer = generic(f);
} }
/*free(mime); seems like magic_file handles the free too*/
return file_buffer; return file_buffer;
} }
-1
View File
@@ -262,7 +262,6 @@ void move_right(){
} }
status &= ~STATUS_MOVE_RIGHT_MATCH; status &= ~STATUS_MOVE_RIGHT_MATCH;
free(cmd); free(cmd);
free(mime);
} }
status |= (STATUS_RUN_BACKEND | STATUS_RELOAD_DIRECTORY); status |= (STATUS_RUN_BACKEND | STATUS_RELOAD_DIRECTORY);