comparison 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
comparison
equal deleted inserted replaced
11291:5abe6815aa5e 11292:231e6d1b57d6
63 63
64 if (ifile) 64 if (ifile)
65 { 65 {
66 unsigned char buf[16]; 66 unsigned char buf[16];
67 67
68 if (! md5_stream (ifile, buf)) 68 int errflag = md5_stream (ifile, buf);
69
70 fclose (ifile);
71
72 if (! errflag)
69 retval = oct_md5_result_to_str (buf); 73 retval = oct_md5_result_to_str (buf);
70 else 74 else
71 (*current_liboctave_error_handler) ("internal error in md5_stream"); 75 (*current_liboctave_error_handler) ("internal error in md5_stream");
72 } 76 }
73 else 77 else