From: rousskov <> Date: Fri, 10 Apr 1998 05:40:39 +0000 (+0000) Subject: - Bug fix: we did not set body.buf if freefunc != NULL in httpBodySet X-Git-Tag: SQUID_3_0_PRE1~3521 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e533411a86ec448a956dd51d88b7539347049c6;p=thirdparty%2Fsquid.git - Bug fix: we did not set body.buf if freefunc != NULL in httpBodySet --- diff --git a/src/HttpBody.cc b/src/HttpBody.cc index fddc77f045..099cf5b2d0 100644 --- a/src/HttpBody.cc +++ b/src/HttpBody.cc @@ -1,7 +1,7 @@ /* - * $Id: HttpBody.cc,v 1.6 1998/03/31 05:35:36 wessels Exp $ + * $Id: HttpBody.cc,v 1.7 1998/04/09 23:40:39 rousskov Exp $ * * DEBUG: section 56 HTTP Message Body * AUTHOR: Alex Rousskov @@ -71,6 +71,8 @@ httpBodySet(HttpBody * body, const char *buf, int size, FREE * freefunc) body->buf = xmalloc(size); xmemcpy(body->buf, buf, size); freefunc = &xfree; + } else { + body->buf = buf; } body->freefunc = freefunc; body->size = size;