Mercurial > dovecot > original-hg > dovecot-1.2
changeset 1992:63e67430b580 HEAD
allow using data stack without data_stack_init().
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 10 May 2004 04:01:24 +0300 |
parents | 689f791b480f |
children | 719228a4df3f |
files | src/lib/data-stack.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/data-stack.c Mon May 10 03:59:27 2004 +0300 +++ b/src/lib/data-stack.c Mon May 10 04:01:24 2004 +0300 @@ -211,6 +211,11 @@ if (size == 0 || size > SSIZE_T_MAX) i_panic("Trying to allocate %"PRIuSIZE_T" bytes", size); + if (data_stack_frame == 0) { + /* kludgy, but allow this before initialization */ + data_stack_init(); + } + /* reset t_buffer_get() mark - not really needed but makes it easier to notice if t_malloc() is called between t_buffer_get() and t_buffer_alloc() */