diff options
author | Thomas Punt <tpunt@hotmail.co.uk> | 2017-04-01 19:38:37 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2017-04-02 00:58:19 +0200 |
commit | 9f08aff3fdd4d1898f5b4bd72ac4c9614d4c65a3 (patch) | |
tree | d090a9d24b9a411d9a438fbf143b10cb801c155a /main/streams/filter.c | |
parent | e0f68ae1441bac063e2a72b980f1ddfee596ea25 (diff) | |
download | php-git-9f08aff3fdd4d1898f5b4bd72ac4c9614d4c65a3.tar.gz |
Remove superfluous allocation checks around ZMM-based functions
Diffstat (limited to 'main/streams/filter.c')
-rw-r--r-- | main/streams/filter.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/main/streams/filter.c b/main/streams/filter.c index 901cf00ad9..bb167c4409 100644 --- a/main/streams/filter.c +++ b/main/streams/filter.c @@ -130,10 +130,6 @@ PHPAPI int php_stream_bucket_split(php_stream_bucket *in, php_stream_bucket **le *left = (php_stream_bucket*)pecalloc(1, sizeof(php_stream_bucket), in->is_persistent); *right = (php_stream_bucket*)pecalloc(1, sizeof(php_stream_bucket), in->is_persistent); - if (*left == NULL || *right == NULL) { - goto exit_fail; - } - (*left)->buf = pemalloc(length, in->is_persistent); (*left)->buflen = length; memcpy((*left)->buf, in->buf, length); @@ -149,21 +145,6 @@ PHPAPI int php_stream_bucket_split(php_stream_bucket *in, php_stream_bucket **le (*right)->is_persistent = in->is_persistent; return SUCCESS; - -exit_fail: - if (*right) { - if ((*right)->buf) { - pefree((*right)->buf, in->is_persistent); - } - pefree(*right, in->is_persistent); - } - if (*left) { - if ((*left)->buf) { - pefree((*left)->buf, in->is_persistent); - } - pefree(*left, in->is_persistent); - } - return FAILURE; } PHPAPI void php_stream_bucket_delref(php_stream_bucket *bucket) |