Build fix: remove cleanse_ctr
authorRich Salz <rsalz@akamai.com>
Thu, 25 Feb 2016 15:16:42 +0000 (10:16 -0500)
committerRich Salz <rsalz@openssl.org>
Thu, 25 Feb 2016 15:19:50 +0000 (10:19 -0500)
Reviewed-by: Andy Polyakov <appro@openssl.org>
crypto/mem.c

index f4da4fad677eb14ae09014c8658abc6512d2c188..16ef64c6fecf69d7cb4957b85530e2ec49fed882 100644 (file)
@@ -140,18 +140,6 @@ void *CRYPTO_malloc(size_t num, const char *file, int line)
     ret = malloc(num);
 #endif
 
-#ifndef OPENSSL_CPUID_OBJ
-    /*
-     * Create a dependency on the value of 'cleanse_ctr' so our memory
-     * sanitisation function can't be optimised out. NB: We only do this for
-     * >2Kb so the overhead doesn't bother us.
-     */
-    if (ret && (num > 2048)) {
-        extern unsigned char cleanse_ctr;
-        ((unsigned char *)ret)[0] = cleanse_ctr;
-    }
-#endif
-
     return ret;
 }