]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
allow using data stack without data_stack_init().
authorTimo Sirainen <tss@iki.fi>
Mon, 10 May 2004 01:01:24 +0000 (04:01 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 10 May 2004 01:01:24 +0000 (04:01 +0300)
--HG--
branch : HEAD

src/lib/data-stack.c

index f141c6512f332523516bea02b280f772d1dbac94..3ddc461cd6ff5f72783ea8e26d792ce8ad67be4c 100644 (file)
@@ -211,6 +211,11 @@ static void *t_malloc_real(size_t size, int permanent)
        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() */