diff options
Diffstat (limited to 'common/iobuf.c')
-rw-r--r-- | common/iobuf.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/common/iobuf.c b/common/iobuf.c index c8ec00f7f..f3d67b474 100644 --- a/common/iobuf.c +++ b/common/iobuf.c @@ -2530,9 +2530,6 @@ iobuf_get_fname_nonnull (iobuf_t a) void iobuf_set_partial_body_length_mode (iobuf_t a, size_t len) { - block_filter_ctx_t *ctx = xcalloc (1, sizeof *ctx); - - ctx->use = a->use; if (!len) /* Disable partial body length mode. */ { @@ -2546,6 +2543,8 @@ iobuf_set_partial_body_length_mode (iobuf_t a, size_t len) else /* Enabled partial body length mode. */ { + block_filter_ctx_t *ctx = xcalloc (1, sizeof *ctx); + ctx->use = a->use; ctx->partial = 1; ctx->size = 0; ctx->first_c = len; |