Add a comment.
authorMichael Adam <obnox@samba.org>
Wed, 9 Jan 2008 00:35:43 +0000 (01:35 +0100)
committerMichael Adam <obnox@samba.org>
Wed, 9 Jan 2008 00:35:43 +0000 (01:35 +0100)
Michael
(This used to be commit 3a4bf4b7c3081048f0d5491dae6610388c268c2f)

source3/lib/talloc/talloc.c

index 476d7651049c1952f51a716dbe8fa5c46a27d3d2..3e976bc0fcfb8e17b07531d07636ca2a43b5496f 100644 (file)
@@ -792,6 +792,7 @@ void *_talloc_realloc(const void *context, void *ptr, size_t size, const char *n
                return NULL;
        }
 
+       /* don't shrink if we have less than 1k to gain */
        if ((size < tc->size) && ((tc->size - size) < 1024)) {
                tc->size = size;
                return ptr;