Skip to content

Commit 7855c52

Browse files
authored
ext/standard: gethostbyaddr/gethostbyname using *NEW_STR flavor. (#18502)
1 parent c91c654 commit 7855c52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/standard/dns.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ PHP_FUNCTION(gethostbyaddr)
163163
#endif
164164
RETVAL_FALSE;
165165
} else {
166-
RETVAL_STR(hostname);
166+
RETVAL_NEW_STR(hostname);
167167
}
168168
}
169169
/* }}} */
@@ -236,7 +236,7 @@ PHP_FUNCTION(gethostbyname)
236236
php_error_docref(NULL, E_WARNING, "Host name to ip failed %s", hostname);
237237
RETURN_STRINGL(hostname, hostname_len);
238238
} else {
239-
RETURN_STR(ipaddr);
239+
RETURN_NEW_STR(ipaddr);
240240
}
241241
}
242242
/* }}} */

0 commit comments

Comments
 (0)