Eliminate unnecessary allocation from md5sum that was leaked without ever being used.
authorRob Landley <rob@landley.net>
Thu, 15 Dec 2005 06:51:52 +0000 (06:51 -0000)
committerRob Landley <rob@landley.net>
Thu, 15 Dec 2005 06:51:52 +0000 (06:51 -0000)
coreutils/md5_sha1_sum.c

index 064340f2564656617e475fe117a2ec61734086a8..287c2f524642f70e596c296fa12829fa2210c713 100644 (file)
@@ -142,15 +142,6 @@ static int hash_files(int argc, char **argv, const uint8_t hash_algo)
        } else
 #endif
        {
-               uint8_t hash_length;
-
-               if (hash_algo == HASH_MD5) {
-                       hash_length = 16;
-               } else {
-                       hash_length = 20;
-               }
-               hash_value = xmalloc(hash_length);
-
                while (optind < argc) {
                        char *file_ptr = argv[optind++];