diff options
-rw-r--r-- | apps/filetypes.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/filetypes.c b/apps/filetypes.c index d275c6501c..1f19d25e5a 100644 --- a/apps/filetypes.c +++ b/apps/filetypes.c | |||
@@ -345,16 +345,19 @@ void filetype_init(void) | |||
345 | strdup_bufsize = filesize(fd); | 345 | strdup_bufsize = filesize(fd); |
346 | strdup_handle = core_alloc_ex("filetypes", strdup_bufsize, &ops); | 346 | strdup_handle = core_alloc_ex("filetypes", strdup_bufsize, &ops); |
347 | if (strdup_handle < 0) | 347 | if (strdup_handle < 0) |
348 | { | ||
349 | close(fd); | ||
348 | return; | 350 | return; |
351 | } | ||
349 | read_builtin_types(); | 352 | read_builtin_types(); |
350 | read_config(fd); | 353 | read_config(fd); |
354 | close(fd); | ||
351 | #ifdef HAVE_LCD_BITMAP | 355 | #ifdef HAVE_LCD_BITMAP |
352 | read_viewer_theme_file(); | 356 | read_viewer_theme_file(); |
353 | #endif | 357 | #endif |
354 | #ifdef HAVE_LCD_COLOR | 358 | #ifdef HAVE_LCD_COLOR |
355 | read_color_theme_file(); | 359 | read_color_theme_file(); |
356 | #endif | 360 | #endif |
357 | close(fd); | ||
358 | core_shrink(strdup_handle, core_get_data(strdup_handle), strdup_cur_idx); | 361 | core_shrink(strdup_handle, core_get_data(strdup_handle), strdup_cur_idx); |
359 | } | 362 | } |
360 | 363 | ||
@@ -437,7 +440,6 @@ static void read_config(int fd) | |||
437 | file_type->icon = Icon_Last_Themeable + atoi(s); | 440 | file_type->icon = Icon_Last_Themeable + atoi(s); |
438 | filetype_count++; | 441 | filetype_count++; |
439 | } | 442 | } |
440 | close(fd); | ||
441 | } | 443 | } |
442 | 444 | ||
443 | int filetype_get_attr(const char* file) | 445 | int filetype_get_attr(const char* file) |