dovecot-1.2: data stack: Fixes to handling out-of-memory situati...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Oct 28 20:10:55 EET 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/acfef2f0fec3
changeset: 9459:acfef2f0fec3
user: Timo Sirainen <tss at iki.fi>
date: Wed Oct 28 14:10:45 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 adee8cb3ff5d -r acfef2f0fec3 src/lib/data-stack.c
--- a/src/lib/data-stack.c Wed Oct 28 14:10:04 2009 -0400
+++ b/src/lib/data-stack.c Wed Oct 28 14:10:45 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