--------------------- PatchSet 10334 Date: 2007/12/28 06:46:54 Author: adri Branch: s27_adri Tag: (none) Log: Lock the httpState so its not freed from underneath us. Members: src/http.c:1.63.2.3.4.24->1.63.2.3.4.25 Index: squid/src/http.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/http.c,v retrieving revision 1.63.2.3.4.24 retrieving revision 1.63.2.3.4.25 diff -u -r1.63.2.3.4.24 -r1.63.2.3.4.25 --- squid/src/http.c 28 Dec 2007 06:22:18 -0000 1.63.2.3.4.24 +++ squid/src/http.c 28 Dec 2007 06:46:54 -0000 1.63.2.3.4.25 @@ -1,6 +1,6 @@ /* - * $Id: http.c,v 1.63.2.3.4.24 2007/12/28 06:22:18 adri Exp $ + * $Id: http.c,v 1.63.2.3.4.25 2007/12/28 06:46:54 adri Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -1016,9 +1016,11 @@ } assert(! memBufIsNull(&httpState->reply_hdr)); assert(buf_start - done < httpState->reply_hdr.size); + cbdataLock(httpState); httpAppendBody(httpState, httpState->reply_hdr.buf + done + buf_start, httpState->reply_hdr.size - done - buf_start, buffer_filled); if (cbdataValid(httpState) && (! memBufIsNull(&httpState->reply_hdr))) memBufReset(&httpState->reply_hdr); + cbdataUnlock(httpState); return; } }