diff options
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -142,7 +142,7 @@ void *debug_realloc (void *ud, void *b, size_t oldsize, size_t size) { | |||
142 | freeblock(mc, block); | 142 | freeblock(mc, block); |
143 | return NULL; | 143 | return NULL; |
144 | } | 144 | } |
145 | if (mc->countlimit != ~0UL && size > 0) { /* count limit in use? */ | 145 | if (mc->countlimit != ~0UL && size != oldsize) { /* count limit in use? */ |
146 | if (mc->countlimit == 0) | 146 | if (mc->countlimit == 0) |
147 | return NULL; /* fake a memory allocation error */ | 147 | return NULL; /* fake a memory allocation error */ |
148 | mc->countlimit--; | 148 | mc->countlimit--; |