Mercurial > octave
diff liboctave/oct-md5.cc @ 11292:231e6d1b57d6
oct_md5_file: close file after reading
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 23 Nov 2010 02:33:34 -0500 |
parents | 07ebe522dac2 |
children | 202bd0f1863d |
line wrap: on
line diff
--- a/liboctave/oct-md5.cc Tue Nov 23 02:18:03 2010 -0500 +++ b/liboctave/oct-md5.cc Tue Nov 23 02:33:34 2010 -0500 @@ -65,7 +65,11 @@ { unsigned char buf[16]; - if (! md5_stream (ifile, buf)) + int errflag = md5_stream (ifile, buf); + + fclose (ifile); + + if (! errflag) retval = oct_md5_result_to_str (buf); else (*current_liboctave_error_handler) ("internal error in md5_stream");