  /*
   * Borland C seems too stupid to be able to shift and do longs in the
 diff --git a/crypto/opensslconf.h.in b/crypto/opensslconf.h.in
-index 7a1c85d..a5f51a7 100644
+index 7a1c85d..7162c0f 100644
 --- a/crypto/opensslconf.h.in
 +++ b/crypto/opensslconf.h.in
 @@ -1,5 +1,15 @@

+    BIO_free_all(tmpmem);
+    return ret;
 }
diff --git a/crypto/rand/rand_unix.c b/crypto/rand/rand_unix.c
index 266111e..f60fac6 100644
--- a/crypto/rand/rand_unix.c

diff --git a/Configure b/Configure
index 4a715dc..b4a4781 100755
--- a/Configure
+++ b/Configure
@@ -605,6 +605,9 @@ my %table=(
 # with itself, Applink is never engaged and can as well be omitted.
 "mingw64", "gcc:-mno-cygwin -DL_ENDIAN -O3 -Wall -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE::-D_MT:MINGW64:-lws2_32 -lgdi32 -lcrypt32:SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:${x86_64_asm}:mingw64:win32:cygwin-shared:-D_WINDLL:-mno-cygwin:.dll.a",
 
+# UEFI
+"UEFI", "cc:-DL_ENDIAN -O:::UEFI::::",
+
 # UWIN 
 "UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:win32",
 
@@ -1082,7 +1085,7 @@ if (defined($disabled{"tls1"}))
 	}
 
 if (defined($disabled{"ec"}) || defined($disabled{"dsa"})
