- Fixed memory leak when HttpUtil::Inflate() fails
authorFelipe Pena <felipe@php.net>
Wed, 30 Dec 2009 13:38:45 +0000 (13:38 +0000)
committerFelipe Pena <felipe@php.net>
Wed, 30 Dec 2009 13:38:45 +0000 (13:38 +0000)
http_encoding_api.c

index 9159106..3a93a19 100644 (file)
@@ -344,6 +344,10 @@ retry_raw_inflate:
                                }
                }
                inflateEnd(&Z);
+
+               if (decoded_len && *decoded) {
+                       efree(*decoded);
+               }
        }
        
        http_error_ex(HE_WARNING, HTTP_E_ENCODING, "Could not inflate data: %s", zError(status));