Module: kamailio
Branch: master
Commit: 53e1a29c265df1489c9bd91deddc0719f8ca2092
URL:
https://github.com/kamailio/kamailio/commit/53e1a29c265df1489c9bd91deddc071…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-05-02T09:27:41+02:00
pua: check if local requests are dropped and free the param
---
Modified: src/modules/pua/pua.c
Modified: src/modules/pua/send_publish.c
---
Diff:
https://github.com/kamailio/kamailio/commit/53e1a29c265df1489c9bd91deddc071…
Patch:
https://github.com/kamailio/kamailio/commit/53e1a29c265df1489c9bd91deddc071…
---
diff --git a/src/modules/pua/pua.c b/src/modules/pua/pua.c
index ef542e2d627..e57183427f3 100644
--- a/src/modules/pua/pua.c
+++ b/src/modules/pua/pua.c
@@ -700,6 +700,11 @@ int update_pua(ua_pres_t *p)
ret_code = -1;
goto done;
}
+ if(uac_r.cb_flags & TMCB_LOCAL_REQUEST_DROP) {
+ shm_free(cb_param);
+ ret_code = 0;
+ goto done;
+ }
} else {
str met = {"SUBSCRIBE", 9};
ua_pres_t *cb_param = NULL;
diff --git a/src/modules/pua/send_publish.c b/src/modules/pua/send_publish.c
index 48e92e9728b..53644265633 100644
--- a/src/modules/pua/send_publish.c
+++ b/src/modules/pua/send_publish.c
@@ -624,6 +624,9 @@ int send_publish(publ_info_t *publ)
LM_ERR("in t_request tm module function\n");
goto error;
}
+ if(uac_r.cb_flags & TMCB_LOCAL_REQUEST_DROP) {
+ shm_free(cb_param);
+ }
done:
ret = 0;