summaryrefslogtreecommitdiff
path: root/main/streams/filter.c
diff options
context:
space:
mode:
authorThomas Punt <tpunt@hotmail.co.uk>2017-03-16 08:27:57 +0000
committerNikita Popov <nikita.ppv@gmail.com>2017-03-16 12:23:55 +0100
commit932c4b35dc0fece175ca2764e4c82493a5004273 (patch)
tree11fe3a3551a00a9746f507e4af2c71c6d1dba0d1 /main/streams/filter.c
parent9d9defa29aafd3b8cfaed8c6e3f8e59c98d0fcb7 (diff)
downloadphp-git-932c4b35dc0fece175ca2764e4c82493a5004273.tar.gz
Remove more unnecessary checks on Zend's allocator functions
Diffstat (limited to 'main/streams/filter.c')
-rw-r--r--main/streams/filter.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/main/streams/filter.c b/main/streams/filter.c
index 47df8834bd..901cf00ad9 100644
--- a/main/streams/filter.c
+++ b/main/streams/filter.c
@@ -74,22 +74,11 @@ PHPAPI php_stream_bucket *php_stream_bucket_new(php_stream *stream, char *buf, s
php_stream_bucket *bucket;
bucket = (php_stream_bucket*)pemalloc(sizeof(php_stream_bucket), is_persistent);
-
- if (bucket == NULL) {
- return NULL;
- }
-
bucket->next = bucket->prev = NULL;
if (is_persistent && !buf_persistent) {
/* all data in a persistent bucket must also be persistent */
bucket->buf = pemalloc(buflen, 1);
-
- if (bucket->buf == NULL) {
- pefree(bucket, 1);
- return NULL;
- }
-
memcpy(bucket->buf, buf, buflen);
bucket->buflen = buflen;
bucket->own_buf = 1;