projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
remove unused code
[m6w6/ext-http]
/
php_http_client_factory.c
diff --git
a/php_http_client_factory.c
b/php_http_client_factory.c
index a7052115b8ef6205310a043f544de87c3918d25e..87c4419eb09c2e07ec8542a4cbba9c86630a14fd 100644
(file)
--- a/
php_http_client_factory.c
+++ b/
php_http_client_factory.c
@@
-174,10
+174,10
@@
PHP_METHOD(HttpClientFactory, createClient)
PHP_METHOD(HttpClientFactory, createPool)
{
int argc = 0;
PHP_METHOD(HttpClientFactory, createPool)
{
int argc = 0;
- zval ***argv;
+ zval ***argv
= NULL
;
with_error_handling(EH_THROW, php_http_exception_get_class_entry()) {
with_error_handling(EH_THROW, php_http_exception_get_class_entry()) {
- if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "
|
*", &argv, &argc)) {
+ if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "*", &argv, &argc)) {
with_error_handling(EH_THROW, php_http_exception_get_class_entry()) {
int i;
zval *zdriver;
with_error_handling(EH_THROW, php_http_exception_get_class_entry()) {
int i;
zval *zdriver;
@@
-228,6
+228,10
@@
PHP_METHOD(HttpClientFactory, createPool)
php_http_error(HE_WARNING, PHP_HTTP_E_REQUEST_FACTORY, "pools are not supported by this driver");
}
} end_error_handling();
php_http_error(HE_WARNING, PHP_HTTP_E_REQUEST_FACTORY, "pools are not supported by this driver");
}
} end_error_handling();
+
+ if (argv) {
+ efree(argv);
+ }
}
} end_error_handling();
}
}
} end_error_handling();
}
@@
-235,10
+239,10
@@
PHP_METHOD(HttpClientFactory, createPool)
PHP_METHOD(HttpClientFactory, createDataShare)
{
int argc = 0;
PHP_METHOD(HttpClientFactory, createDataShare)
{
int argc = 0;
- zval ***argv;
+ zval ***argv
= NULL
;
with_error_handling(EH_THROW, php_http_exception_get_class_entry()) {
with_error_handling(EH_THROW, php_http_exception_get_class_entry()) {
- if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "
|
*", &argv, &argc)) {
+ if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "*", &argv, &argc)) {
with_error_handling(EH_THROW, php_http_exception_get_class_entry()) {
int i;
zval *zdriver;
with_error_handling(EH_THROW, php_http_exception_get_class_entry()) {
int i;
zval *zdriver;
@@
-289,6
+293,9
@@
PHP_METHOD(HttpClientFactory, createDataShare)
php_http_error(HE_WARNING, PHP_HTTP_E_REQUEST_FACTORY, "datashares are not supported by this driver");
}
} end_error_handling();
php_http_error(HE_WARNING, PHP_HTTP_E_REQUEST_FACTORY, "datashares are not supported by this driver");
}
} end_error_handling();
+ if (argv) {
+ efree(argv);
+ }
}
} end_error_handling();
}
}
} end_error_handling();
}