dovecot-2.0: data stack: Fixes to handling out-of-memory situati...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Oct 28 20:11:02 EET 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/728a029f56f9
changeset: 10215:728a029f56f9
user: Timo Sirainen <tss at iki.fi>
date: Wed Oct 28 14:10:55 2009 -0400
description:
data stack: Fixes to handling out-of-memory situations.
diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
src/lib/data-stack.c | 5 +++--
diffs (22 lines):
diff -r c84c4f705e69 -r 728a029f56f9 src/lib/data-stack.c
--- 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 bool outofmem = FALSE;
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 @@ static void free_blocks(struct stack_blo
unused_block = block;
} else {
#ifndef USE_GC
- free(block);
+ if (block != &outofmem_area.block)
+ free(block);
#endif
}
More information about the dovecot-cvs
mailing list