Skip to content

Commit

Permalink
further leak fixes, removing AF_PACKET handling for addrinfo_connect.
Browse files Browse the repository at this point in the history
does not make sense, we just bind to raw packets.
  • Loading branch information
devnexen committed Feb 7, 2025
1 parent 8b9e081 commit 3723530
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ext/sockets/sockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -1683,6 +1683,9 @@ PHP_FUNCTION(socket_recvfrom)
break;
}
default:
zend_string_efree(recv_buf);
zval_ptr_dtor(&zpayload);
zval_ptr_dtor(&obj);
zend_value_error("unsupported ip header protocol");
RETURN_THROWS();
}
Expand Down Expand Up @@ -2969,8 +2972,6 @@ PHP_FUNCTION(socket_addrinfo_connect)

ai = Z_ADDRESS_INFO_P(arg1);

PHP_ETH_PROTO_CHECK(ai->addrinfo.ai_protocol, ai->addrinfo.ai_family);

object_init_ex(return_value, socket_ce);
php_sock = Z_SOCKET_P(return_value);

Expand Down

0 comments on commit 3723530

Please sign in to comment.