# HG changeset patch # User John W. Eaton # Date 1290497614 18000 # Node ID 231e6d1b57d6bf4cc6e9bbbfd57a0a065f7986fc # Parent 5abe6815aa5e6956652200b0cfafa509c9509598 oct_md5_file: close file after reading diff -r 5abe6815aa5e -r 231e6d1b57d6 liboctave/ChangeLog --- a/liboctave/ChangeLog Tue Nov 23 02:18:03 2010 -0500 +++ b/liboctave/ChangeLog Tue Nov 23 02:33:34 2010 -0500 @@ -1,3 +1,7 @@ +2010-11-23 John W. Eaton + + * oct-md5.cc (oct_md5_file): Close file after reading. + 2010-11-22 John W. Eaton * boolSparse.cc (SparseBoolMatrix::sum, SparseBoolMatrix::any): diff -r 5abe6815aa5e -r 231e6d1b57d6 liboctave/oct-md5.cc --- 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");