]> git.sur5r.net Git - openldap/commitdiff
ITS#6005 librewrite must use the same mem allocators as slapd
authorHoward Chu <hyc@openldap.org>
Sat, 7 Mar 2009 23:21:26 +0000 (23:21 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 7 Mar 2009 23:21:26 +0000 (23:21 +0000)
libraries/librewrite/rewrite-int.h

index 3af33661017aca1171693b7051aac1d03220c732..8f9c4376931b8e678c2f1d1719e71791e8400411 100644 (file)
 
 #include <rewrite.h>
 
+#define malloc(x)      ber_memalloc(x)
+#define calloc(x,y)    ber_memcalloc(x,y)
+#define realloc(x,y)   ber_memrealloc(x,y)
+#define free(x)        ber_memfree(x)
+#undef strdup
+#define        strdup(x)       ber_strdup(x)
+
 /* Uncomment to use ldap pvt threads */
 #define USE_REWRITE_LDAP_PVT_THREADS
 #include <ldap_pvt_thread.h>