coverity fix
authorMichael Wallner <mike@php.net>
Wed, 14 Sep 2016 10:55:43 +0000 (12:55 +0200)
committerMichael Wallner <mike@php.net>
Wed, 14 Sep 2016 10:55:43 +0000 (12:55 +0200)
src/php_http_encoding.c

index 8c29216ab7added98c5fcdb84823f2d6c7ead1d7..b5094eea1ac91f16fceeb0cab955641fa9ea790f 100644 (file)
@@ -265,10 +265,9 @@ php_http_encoding_stream_t *php_http_encoding_stream_copy(php_http_encoding_stre
        TSRMLS_FETCH_FROM_CTX(from->ts);
 
        if (from->ops->copy) {
-               int freeme;
                php_http_encoding_stream_t *ns;
 
-               if ((freeme = !to)) {
+               if (!to) {
                        to = pemalloc(sizeof(*to), (from->flags & PHP_HTTP_ENCODING_STREAM_PERSISTENT));
                }
                memset(to, 0, sizeof(*to));
@@ -282,10 +281,6 @@ php_http_encoding_stream_t *php_http_encoding_stream_copy(php_http_encoding_stre
                } else {
                        return to;
                }
-
-               if (freeme) {
-                       pefree(to, (to->flags & PHP_HTTP_ENCODING_STREAM_PERSISTENT));
-               }
        }
 
        return NULL;