- 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 9159106a81bb3e7235c4a5dacf54fbbf0dbd23db..3a93a19729f9c9405860eb5a9f80f1c71d38b909 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));