File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -499,14 +499,14 @@ PHP_METHOD(DOMXPath, quote) {
499499 memcpy (ZSTR_VAL (output ) + 1 , input , input_len );
500500 ZSTR_VAL (output )[input_len + 1 ] = '\'' ;
501501 ZSTR_VAL (output )[input_len + 2 ] = '\0' ;
502- RETURN_STR (output );
502+ RETURN_NEW_STR (output );
503503 } else if (memchr (input , '"' , input_len ) == NULL ) {
504504 zend_string * const output = zend_string_safe_alloc (1 , input_len , 2 , false);
505505 ZSTR_VAL (output )[0 ] = '"' ;
506506 memcpy (ZSTR_VAL (output ) + 1 , input , input_len );
507507 ZSTR_VAL (output )[input_len + 1 ] = '"' ;
508508 ZSTR_VAL (output )[input_len + 2 ] = '\0' ;
509- RETURN_STR (output );
509+ RETURN_NEW_STR (output );
510510 } else {
511511 smart_str output = {0 };
512512 // need to use the concat() trick published by Robert Rossney at https://stackoverflow.com/a/1352556/1067003
@@ -528,7 +528,7 @@ PHP_METHOD(DOMXPath, quote) {
528528 }
529529 ZEND_ASSERT (ptr == end );
530530 ZSTR_VAL (output .s )[ZSTR_LEN (output .s ) - 1 ] = ')' ;
531- RETURN_STR (smart_str_extract (& output ));
531+ RETURN_NEW_STR (smart_str_extract (& output ));
532532 }
533533}
534534/* }}} */
You can’t perform that action at this time.
0 commit comments