double free fix
This commit is contained in:
+1
-2
@@ -22,7 +22,7 @@ void images_clear();
|
||||
char* generic(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;
|
||||
}
|
||||
@@ -52,7 +52,6 @@ char* preview_file(file *f){
|
||||
file_buffer = generic(f);
|
||||
}
|
||||
|
||||
/*free(mime); seems like magic_file handles the free too*/
|
||||
return file_buffer;
|
||||
|
||||
}
|
||||
|
||||
@@ -262,7 +262,6 @@ void move_right(){
|
||||
}
|
||||
status &= ~STATUS_MOVE_RIGHT_MATCH;
|
||||
free(cmd);
|
||||
free(mime);
|
||||
}
|
||||
|
||||
status |= (STATUS_RUN_BACKEND | STATUS_RELOAD_DIRECTORY);
|
||||
|
||||
Reference in New Issue
Block a user