From bdf32aa5fadfeedaeff828890949b4bc0f889bc8 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 17 Oct 2005 14:43:32 +0000 Subject: [PATCH] - ditch the 1 byte leak --- package2.xml | 21 ++++++--------------- phpstr/phpstr.c | 7 ++++--- 2 files changed, 10 insertions(+), 18 deletions(-) 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); } /* -- 2.30.2