Merge pull request #209 from softwareradiosystems/minor_fix

some allocated buffers in the s1ap were not being correctly deallocated
master
Andre Puschmann 6 years ago committed by GitHub
commit 492958fdba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -849,6 +849,9 @@ bool s1ap::send_initial_ctxt_setup_response(uint16_t rnti, LIBLTE_S1AP_MESSAGE_I
ssize_t n_sent = sctp_sendmsg(socket_fd, buf->msg, buf->N_bytes,
(struct sockaddr*)&mme_addr, sizeof(struct sockaddr_in),
htonl(PPID), 0, ue_ctxt_map[rnti].stream_id, 0, 0);
pool->deallocate(buf);
if(n_sent == -1) {
s1ap_log->error("Failed to send InitialContextSetupResponse for RNTI:0x%x\n", rnti);
return false;
@ -900,6 +903,9 @@ bool s1ap::send_erab_setup_response(uint16_t rnti, LIBLTE_S1AP_MESSAGE_E_RABSETU
ssize_t n_sent = sctp_sendmsg(socket_fd, buf->msg, buf->N_bytes,
(struct sockaddr*)&mme_addr, sizeof(struct sockaddr_in),
htonl(PPID), 0, ue_ctxt_map[rnti].stream_id, 0, 0);
pool->deallocate(buf);
if(n_sent == -1) {
s1ap_log->error("Failed to send E_RABSetupResponse for RNTI:0x%x\n", rnti);
return false;
@ -945,6 +951,9 @@ bool s1ap::send_initial_ctxt_setup_failure(uint16_t rnti)
ssize_t n_sent = sctp_sendmsg(socket_fd, buf->msg, buf->N_bytes,
(struct sockaddr*)&mme_addr, sizeof(struct sockaddr_in),
htonl(PPID), 0, ue_ctxt_map[rnti].stream_id, 0, 0);
pool->deallocate(buf);
if(n_sent == -1) {
s1ap_log->error("Failed to send UplinkNASTransport for RNTI:0x%x\n", rnti);
return false;

Loading…
Cancel
Save