Closing the libmagic file after use.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4881 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2014-05-14 09:44:19 +00:00
parent ef2cbb7f35
commit f215603a10
2 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,7 @@
two-column characters properly. This fixes Savannah bug #31743. two-column characters properly. This fixes Savannah bug #31743.
* src/nano.c (precalc_multicolorinfo): Improve debugging messages, * src/nano.c (precalc_multicolorinfo): Improve debugging messages,
and remove superfluous assignment (fileptr already equals endptr). and remove superfluous assignment (fileptr already equals endptr).
* src/color.c (color_update): Close the libmagic file after use.
2014-05-13 Benno Schulenberg <bensberg@justemail.net> 2014-05-13 Benno Schulenberg <bensberg@justemail.net>
* src/text.c (do_linter): Make an error message somewhat clearer. * src/text.c (do_linter): Make an error message somewhat clearer.

View File

@ -201,8 +201,9 @@ void color_update(void)
statusbar(_("magic_file(%s) failed: %s"), statusbar(_("magic_file(%s) failed: %s"),
openfile->filename, magic_error(cookie)); openfile->filename, magic_error(cookie));
} }
magic_close(cookie);
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "Returned magic string is: %s\n", magicstring); fprintf(stderr, "Returned magic string is: %s\n", magicstring);
#endif #endif
} }
} }