Fix free errors in ocsp utility.
[openssl.git] / util / perlpath.pl
index 0aa5ada..a1f236b 100755 (executable)
@@ -17,7 +17,12 @@ sub wanted
        @a=<IN>;
        close(IN);
 
-       $a[0]="#!$ARGV[0]/perl\n";
+       if (-d $ARGV[0]) {
+               $a[0]="#!$ARGV[0]/perl\n";
+       }
+       else {
+               $a[0]="#!$ARGV[0]\n";
+       }
 
        # Playing it safe...
        $new="$_.new";