]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/sl_malloc.c
More for ITS#6045: clear o_callback as well.
[openldap] / servers / slapd / sl_malloc.c
index 4feab16e2b2438f02943fe1a892db05ece729aa9..a5d8760b64d77f7eda5dd3735fc37be0bc7d736d 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2003-2007 The OpenLDAP Foundation.
+ * Copyright 2003-2009 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -129,7 +129,7 @@ slap_sl_mem_create(
                        slheap = sh;
 #else
                        ldap_pvt_thread_pool_setkey(ctx, (void *)slap_sl_mem_init,
-                               (void *)sh, slap_sl_mem_destroy);
+                               (void *)sh, slap_sl_mem_destroy, NULL, NULL);
 #endif
                } else if ( size > (char *)sh->sh_end - (char *)sh->sh_base ) {
                        void    *newptr;
@@ -162,7 +162,7 @@ slap_sl_mem_create(
                        slheap = sh;
 #else
                        ldap_pvt_thread_pool_setkey(ctx, (void *)slap_sl_mem_init,
-                               (void *)sh, slap_sl_mem_destroy);
+                               (void *)sh, slap_sl_mem_destroy, NULL, NULL);
 #endif
                } else {
                        for (i = 0; i <= sh->sh_maxorder - order_start; i++) {
@@ -195,7 +195,7 @@ slap_sl_mem_create(
                        if (size > (char *)sh->sh_end - (char *)sh->sh_base) {
                                void    *newptr;
 
-                               newptr = realloc( sh->sh_base, size );
+                               newptr = ch_realloc( sh->sh_base, size );
                                if ( newptr == NULL ) return NULL;
                                sh->sh_base = newptr;
                        }
@@ -246,7 +246,8 @@ slap_sl_mem_detach(
        slheap = NULL;
 #else
        /* separate from context */
-       ldap_pvt_thread_pool_setkey( ctx, (void *)slap_sl_mem_init, NULL, NULL );
+       ldap_pvt_thread_pool_setkey( ctx, (void *)slap_sl_mem_init,
+               NULL, 0, NULL, NULL );
 #endif
 }