Only set M_PERTURB if TALLOC_FREE_FILL is unset
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 18 Jun 2014 16:59:55 +0000 (17:59 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 18 Jun 2014 17:00:04 +0000 (18:00 +0100)
src/lib/debug.c

index 53d5ae7..7dad377 100644 (file)
@@ -745,7 +745,7 @@ int fr_fault_setup(char const *cmd, char const *program)
                 *  uninitialised and freed memory, to make memory issues easier
                 *  to track down.
                 */
-               mallopt(M_PERTURB, 0x42);
+               if (!getenv(TALLOC_FREE_FILL)) mallopt(M_PERTURB, 0x42);
                mallopt(M_CHECK_ACTION, 3);
 #endif