Skip to content

Commit daa00b0

Browse files
committed
further leak fixes, removing AF_PACKET handling for addrinfo_connect.
does not make sense, we just bind to raw packets.
1 parent 25545c5 commit daa00b0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ext/sockets/sockets.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,6 +1681,9 @@ PHP_FUNCTION(socket_recvfrom)
16811681
break;
16821682
}
16831683
default:
1684+
zend_string_efree(recv_buf);
1685+
zval_ptr_dtor(&zpayload);
1686+
zval_ptr_dtor(&obj);
16841687
zend_value_error("unsupported ip header protocol");
16851688
RETURN_THROWS();
16861689
}
@@ -2968,8 +2971,6 @@ PHP_FUNCTION(socket_addrinfo_connect)
29682971

29692972
ai = Z_ADDRESS_INFO_P(arg1);
29702973

2971-
PHP_ETH_PROTO_CHECK(ai->addrinfo.ai_protocol, ai->addrinfo.ai_family);
2972-
29732974
object_init_ex(return_value, socket_ce);
29742975
php_sock = Z_SOCKET_P(return_value);
29752976

0 commit comments

Comments
 (0)