]> err.no Git - dak/commitdiff
debianqueued: construct Digest::MD5 object before trying to use it
authorAnsgar Burchardt <ansgar@debian.org>
Thu, 6 Dec 2012 11:32:30 +0000 (12:32 +0100)
committerAnsgar Burchardt <ansgar@debian.org>
Thu, 6 Dec 2012 11:32:30 +0000 (12:32 +0100)
tools/debianqueued-0.9/debianqueued

index 4c77e2af0e52f9ebd043c50ea434fa36d7baaf44..0ead31ccc7049683dba0c95719b4b1722438f5a3 100755 (executable)
@@ -2134,9 +2134,10 @@ sub rm(@) {
 #
 sub md5sum($) {
   my $file = shift;
+  my $md5 = Digest::MD5->new;
 
   open my $fh, "<", $file or return "";
-  my $md5 = $md5->addfile($fh);
+  $md5->addfile($fh);
   close $fh;
 
   return $md5->hexdigest;