projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
2fadfe4
)
more checks
author
Michael Wallner
<mike@php.net>
Wed, 21 Jan 2015 16:09:23 +0000
(17:09 +0100)
committer
Michael Wallner
<mike@php.net>
Wed, 21 Jan 2015 16:09:23 +0000
(17:09 +0100)
php_http_env_response.c
patch
|
blob
|
history
diff --git
a/php_http_env_response.c
b/php_http_env_response.c
index c8a31e070bd0b1b38fddbb60aadfe841738c9bf3..d13cde104a7acb9f8230613ff3704173fdfcb15f 100644
(file)
--- a/
php_http_env_response.c
+++ b/
php_http_env_response.c
@@
-62,12
+62,14
@@
static void set_option(zval *options, const char *name_str, size_t name_len, int
}
static zval *get_option(zval *options, const char *name_str, size_t name_len)
{
}
static zval *get_option(zval *options, const char *name_str, size_t name_len)
{
- zval *val;
+ zval *val
= NULL
;
if (Z_TYPE_P(options) == IS_OBJECT) {
val = zend_read_property(Z_OBJCE_P(options), options, name_str, name_len, 0);
if (Z_TYPE_P(options) == IS_OBJECT) {
val = zend_read_property(Z_OBJCE_P(options), options, name_str, name_len, 0);
- } else {
+ } else
if (Z_TYPE_P(options) == IS_ARRAY)
{
val = zend_symtable_str_find(Z_ARRVAL_P(options), name_str, name_len);
val = zend_symtable_str_find(Z_ARRVAL_P(options), name_str, name_len);
+ } else {
+ abort();
}
if (val) {
Z_TRY_ADDREF_P(val);
}
if (val) {
Z_TRY_ADDREF_P(val);
@@
-85,7
+87,7
@@
static php_http_message_body_t *get_body(zval *options)
body = body_obj->body;
}
body = body_obj->body;
}
-
zval_ptr_dtor
(zbody);
+
Z_TRY_DELREF_P
(zbody);
}
return body;
}
return body;
@@
-101,7
+103,7
@@
static php_http_message_t *get_request(zval *options)
request = request_obj->message;
}
request = request_obj->message;
}
-
zval_ptr_dtor
(zrequest);
+
Z_TRY_DELREF_P
(zrequest);
}
return request;
}
return request;