Fixes coverity 373325

This commit is contained in:
Alejandro Leal Conejos 2021-10-26 16:27:28 +02:00 committed by Ismael Gomez
parent 93649429dd
commit 4c518b8c82
1 changed files with 2 additions and 0 deletions

View File

@ -165,10 +165,12 @@ int s1ap::enb_listen()
// S1-MME bind
bzero(&s1mme_addr, sizeof(s1mme_addr));
if (not srsran::net_utils::set_sockaddr(&s1mme_addr, m_s1ap_args.mme_bind_addr.c_str(), S1MME_PORT)) {
close(sock_fd);
m_logger.error("Invalid mme_bind_addr: %s", m_s1ap_args.mme_bind_addr.c_str());
srsran::console("Invalid mme_bind_addr: %s\n", m_s1ap_args.mme_bind_addr.c_str());
return SRSRAN_ERROR;
}
if (not srsran::net_utils::bind_addr(sock_fd, s1mme_addr)) {
close(sock_fd);
m_logger.error("Error binding SCTP socket");