projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
- improve http_get_request_headers()
[m6w6/ext-http]
/
http.c
diff --git
a/http.c
b/http.c
index b50682fa8d33ac370d457b50e121acf63b0bdc12..cbc38eb7208972603761e9ecd454f8dd07a02f0d 100644
(file)
--- a/
http.c
+++ b/
http.c
@@
-199,6
+199,11
@@
static inline void _http_globals_init(zend_http_globals *G TSRMLS_DC)
#define http_globals_free(g) _http_globals_free((g) TSRMLS_CC)
static inline void _http_globals_free(zend_http_globals *G TSRMLS_DC)
{
#define http_globals_free(g) _http_globals_free((g) TSRMLS_CC)
static inline void _http_globals_free(zend_http_globals *G TSRMLS_DC)
{
+ if (G->request.headers) {
+ zend_hash_destroy(G->request.headers);
+ FREE_HASHTABLE(G->request.headers);
+ G->request.headers = NULL;
+ }
STR_SET(G->send.content_type, NULL);
STR_SET(G->send.unquoted_etag, NULL);
}
STR_SET(G->send.content_type, NULL);
STR_SET(G->send.unquoted_etag, NULL);
}