SCTP: fix a memory leak

call freeaddrinfo() before return'ing from the function.
This commit is contained in:
Robert Schmidt
2025-10-30 08:04:39 +01:00
parent a2b127f643
commit e9bf6344b0
+1
View File
@@ -477,6 +477,7 @@ static void sctp_handle_new_association_req(const instance_t instance,
if (errno != EINPROGRESS) { if (errno != EINPROGRESS) {
SCTP_ERROR("Connect failed: %s\n", strerror(errno)); SCTP_ERROR("Connect failed: %s\n", strerror(errno));
sctp_itti_send_association_resp(requestor, instance, -1, req->ulp_cnx_id, SCTP_STATE_UNREACHABLE, 0, 0); sctp_itti_send_association_resp(requestor, instance, -1, req->ulp_cnx_id, SCTP_STATE_UNREACHABLE, 0, 0);
freeaddrinfo(serv);
close(sd); close(sd);
return; return;
} else { } else {