Module: kamailio Branch: master Commit: 00aac8d48370fac356eecff535835d918c631cc5 URL: https://github.com/kamailio/kamailio/commit/00aac8d48370fac356eecff535835d918c631cc5
Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2024-05-01T07:00:58+02:00 uac: check if local requests are dropped and free the param --- Modified: src/modules/uac/uac_reg.c Modified: src/modules/uac/uac_send.c --- Diff: https://github.com/kamailio/kamailio/commit/00aac8d48370fac356eecff535835d918c631cc5.diff Patch: https://github.com/kamailio/kamailio/commit/00aac8d48370fac356eecff535835d918c631cc5.patch --- diff --git a/src/modules/uac/uac_reg.c b/src/modules/uac/uac_reg.c index 4885f4d4023..bbe592ba04c 100644 --- a/src/modules/uac/uac_reg.c +++ b/src/modules/uac/uac_reg.c @@ -974,6 +974,10 @@ void uac_reg_tm_callback(struct cell *t, int type, struct tmcb_params *ps) ri->l_uuid.len, ri->l_uuid.s); goto error; } + if(uac_r.cb_flags & TMCB_LOCAL_REQUEST_DROP) { + shm_free(uuid); + *ps->param = NULL; + } ri->flags |= UAC_REG_AUTHSENT; lock_release(ri->lock); @@ -1130,6 +1134,9 @@ int uac_reg_send(reg_uac_t *reg, time_t tn) reg->flags &= ~UAC_REG_ONGOING; return -1; } + if(uac_r.cb_flags & TMCB_LOCAL_REQUEST_DROP) { + shm_free(uuid); + } return 0; } diff --git a/src/modules/uac/uac_send.c b/src/modules/uac/uac_send.c index c29e9b4b90e..f91a0c75b4f 100644 --- a/src/modules/uac/uac_send.c +++ b/src/modules/uac/uac_send.c @@ -794,6 +794,11 @@ void uac_send_tm_callback(struct cell *t, int type, struct tmcb_params *ps) LM_ERR("failed to send request with authentication\n"); goto error; } + if(uac_r.cb_flags & TMCB_LOCAL_REQUEST_DROP) { + shm_free(tp); + *ps->param = NULL; + tp = NULL; + } if(tp->evroute != 0) { return; @@ -871,6 +876,10 @@ int uac_req_send(void) shm_free(tp); return -1; } + if(uac_r.cb_flags & TMCB_LOCAL_REQUEST_DROP) { + if(tp != NULL) + shm_free(tp); + } return 1; } _______________________________________________ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org