Avoid a potential double-free here

This commit is contained in:
Rasmus Lerdorf 2011-08-06 23:42:52 +00:00
parent d03961b23b
commit 9eb19ae2bf

View File

@ -910,6 +910,7 @@ static int php_network_listen_socket(const char *host, int *port, int socktype,
for (p = sal; *p; p++) {
if (sa) {
pefree(sa, 1);
sa = NULL;
}
retval = socket((*p)->sa_family, socktype, 0);