Skip to content
Snippets Groups Projects
Commit 4c0e4741 authored by Howard Chu's avatar Howard Chu
Browse files

Add comments to sl_mem_detach()

parent 703444fe
Branches
Tags
No related merge requests found
......@@ -78,7 +78,15 @@ sl_mem_detach(
void *memctx
)
{
/* separate from context */
ldap_pvt_thread_pool_setkey( ctx, sl_mem_init, NULL, NULL );
/* The code used to try to use realloc to shrink the region.
* This is unsafe, since realloc may return a different block
* of memory from what was passed in, and the region contains
* pointers that reference itself. After realloc, these pointers
* are invalid, and crashes result.
*/
}
void *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment