Cleaned up location of init and free for some programs to prevent memory
leaks on incorrect arguments
diff --git a/programs/hash/md5sum.c b/programs/hash/md5sum.c
index d614aa1..7429650 100644
--- a/programs/hash/md5sum.c
+++ b/programs/hash/md5sum.c
@@ -132,6 +132,8 @@
n = sizeof( line );
}
+ fclose( f );
+
if( nb_err1 != 0 )
{
printf( "WARNING: %d (out of %d) input files could "
diff --git a/programs/hash/sha1sum.c b/programs/hash/sha1sum.c
index ff0514a..bd3fd6e 100644
--- a/programs/hash/sha1sum.c
+++ b/programs/hash/sha1sum.c
@@ -132,6 +132,8 @@
n = sizeof( line );
}
+ fclose( f );
+
if( nb_err1 != 0 )
{
printf( "WARNING: %d (out of %d) input files could "
diff --git a/programs/hash/sha2sum.c b/programs/hash/sha2sum.c
index c3f1a0d..2e6884d 100644
--- a/programs/hash/sha2sum.c
+++ b/programs/hash/sha2sum.c
@@ -132,6 +132,8 @@
n = sizeof( line );
}
+ fclose( f );
+
if( nb_err1 != 0 )
{
printf( "WARNING: %d (out of %d) input files could "