]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm: Reset JSON formatter context before reuse
authorAki Tuomi <aki.tuomi@dovecot.net>
Tue, 2 Feb 2016 20:06:38 +0000 (22:06 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 3 Feb 2016 08:50:43 +0000 (10:50 +0200)
This is needed to implement multicommand support in HTTP API.

src/doveadm/doveadm-print-json.c

index d5ac28d30f1c10501f5c1cdae251dc4f79b520e3..a929d27ec0799855858ad24832705b4c487e7ab1 100644 (file)
@@ -23,6 +23,7 @@ static void doveadm_print_json_flush_internal(void);
 
 static void doveadm_print_json_init(void)
 {
+       memset(&ctx,0,sizeof(ctx));
        ctx.pool = pool_alloconly_create("doveadm json print", 1024);
        ctx.str = str_new(ctx.pool, 256);
        p_array_init(&ctx.headers, ctx.pool, 1);