Skip to content

Commit a7de2af

Browse files
committed
Use TRY_ADDREF/TRY_DELREF in soap
The DELREF part is a possible fix for bug #78278, the ADDREF part is a drive-by fix.
1 parent 4a91f66 commit a7de2af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/soap/php_encoding.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2269,7 +2269,7 @@ static xmlNodePtr to_xml_array(encodeTypePtr type, zval *data, int style, xmlNod
22692269
} else {
22702270
add_next_index_zval(&array_copy, val);
22712271
}
2272-
Z_ADDREF_P(val);
2272+
Z_TRY_ADDREF_P(val);
22732273

22742274
iter->funcs->move_forward(iter);
22752275
if (EG(exception)) {
@@ -2850,7 +2850,7 @@ static zval *guess_zval_convert(zval *ret, encodeTypePtr type, xmlNodePtr data)
28502850

28512851
object_init_ex(&soapvar, soap_var_class_entry);
28522852
add_property_long(&soapvar, "enc_type", enc->details.type);
2853-
Z_DELREF_P(ret);
2853+
Z_TRY_DELREF_P(ret);
28542854
add_property_zval(&soapvar, "enc_value", ret);
28552855
parse_namespace(type_name, &cptype, &ns);
28562856
nsptr = xmlSearchNs(data->doc, data, BAD_CAST(ns));

0 commit comments

Comments
 (0)