]> git.sur5r.net Git - openldap/commitdiff
Don't use sasl_set_alloc on Cyrus 2, it manages all of its memory
authorHoward Chu <hyc@openldap.org>
Mon, 2 Sep 2002 22:25:26 +0000 (22:25 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 2 Sep 2002 22:25:26 +0000 (22:25 +0000)
internally and we don't want to get in the way.

libraries/libldap/cyrus.c
servers/slapd/sasl.c

index b892accecdf488429f1e07c159a4baf5c08940d5..59d5b41cf7e5a92a69bb433d6f18343e2242f152 100644 (file)
@@ -82,7 +82,8 @@ int ldap_int_sasl_init( void )
                return 0;
        }
 
-#ifndef CSRIMALLOC
+/* SASL 2 takes care of its own memory completely internally */
+#if SASL_VERSION_MAJOR < 2 && !defined(CSRIMALLOC)
        sasl_set_alloc(
                ber_memalloc,
                ber_memcalloc,
index 6db5f1dc3c2736d652c58fdaa1def43054af13c6..3430d4ee68015ff84a10df9ab195a4f5fbb0e136 100644 (file)
@@ -1114,12 +1114,15 @@ int slap_sasl_init( void )
                return -1;
        }
 #endif
-       
+
+       /* SASL 2 does its own memory management internally */
+#if SASL_VERSION_MAJOR < 2
        sasl_set_alloc(
                ber_memalloc,
                ber_memcalloc,
                ber_memrealloc,
                ber_memfree ); 
+#endif
 
        sasl_set_mutex(
                ldap_pvt_sasl_mutex_new,