diff options
Diffstat (limited to 'lib/content_encoding.c')
-rw-r--r-- | lib/content_encoding.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/content_encoding.c b/lib/content_encoding.c index 2b2188b73..7c979efcc 100644 --- a/lib/content_encoding.c +++ b/lib/content_encoding.c @@ -873,10 +873,9 @@ static contenc_writer *new_unencoding_writer(struct connectdata *conn, contenc_writer *downstream) { size_t sz = offsetof(contenc_writer, params) + handler->paramsize; - contenc_writer *writer = (contenc_writer *) malloc(sz); + contenc_writer *writer = (contenc_writer *) calloc(1, sz); if(writer) { - memset(writer, 0, sz); writer->handler = handler; writer->downstream = downstream; if(handler->init_writer(conn, writer)) { |