Mercurial > dovecot > core-2.2
changeset 10215:728a029f56f9 HEAD
data stack: Fixes to handling out-of-memory situations.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 28 Oct 2009 14:10:55 -0400 |
parents | c84c4f705e69 |
children | e3d0385ce703 |
files | src/lib/data-stack.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/data-stack.c Wed Oct 28 14:10:17 2009 -0400 +++ b/src/lib/data-stack.c Wed Oct 28 14:10:55 2009 -0400 @@ -69,7 +69,7 @@ static union { struct stack_block block; - unsigned char data[128]; + unsigned char data[512]; } outofmem_area; static void data_stack_last_buffer_reset(bool preserve_data ATTR_UNUSED) @@ -169,7 +169,8 @@ unused_block = block; } else { #ifndef USE_GC - free(block); + if (block != &outofmem_area.block) + free(block); #endif }