From: Michael Wallner Date: Mon, 17 Oct 2005 14:43:32 +0000 (+0000) Subject: - ditch the 1 byte leak X-Git-Tag: RELEASE_0_16_0~8 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=commitdiff_plain;h=bdf32aa5fadfeedaeff828890949b4bc0f889bc8 - ditch the 1 byte leak --- diff --git a/package2.xml b/package2.xml index 6396dd2..7e41801 100644 --- a/package2.xml +++ b/package2.xml @@ -30,8 +30,8 @@ 2005-00-00 - 0.15.0 - 0.14.0 + 0.16.0 + 0.16.0 beta @@ -39,18 +39,7 @@ PHP License @@ -158,7 +147,9 @@ - + + + diff --git a/phpstr/phpstr.c b/phpstr/phpstr.c index 45c9e26..c0d9543 100644 --- a/phpstr/phpstr.c +++ b/phpstr/phpstr.c @@ -284,15 +284,16 @@ PHPSTR_API void phpstr_chunked_output(phpstr **s, const char *data, size_t data_ while (got = phpstr_chunk_buffer(s, data, data_len, &chunk, chunk_len)) { passthru(chunk, got TSRMLS_CC); - efree(chunk); - data = NULL; - data_len = 0; if (!chunk_len) { /* we already got the last chunk, and freed all resources */ break; } + data = NULL; + data_len = 0; + STR_SET(chunk, NULL); } + STR_FREE(chunk); } /*