Module: kamailio Branch: master Commit: fab3f881634b1233e6c5446ffafbd30ab07c0bc6 URL: https://github.com/kamailio/kamailio/commit/fab3f881634b1233e6c5446ffafbd30a...
Author: Charles Chance charles.chance@sipcentric.com Committer: Charles Chance charles.chance@sipcentric.com Date: 2018-02-09T09:37:24Z
presence: delay freeing generated etag string
- it may still be needed for replication
---
Modified: src/modules/presence/presentity.c
---
Diff: https://github.com/kamailio/kamailio/commit/fab3f881634b1233e6c5446ffafbd30a... Patch: https://github.com/kamailio/kamailio/commit/fab3f881634b1233e6c5446ffafbd30a...
---
diff --git a/src/modules/presence/presentity.c b/src/modules/presence/presentity.c index 1c7c4240b9..514e89036c 100644 --- a/src/modules/presence/presentity.c +++ b/src/modules/presence/presentity.c @@ -1100,10 +1100,6 @@ int update_presentity(struct sip_msg* msg, presentity_t* presentity, str* body, } if (sent_reply) *sent_reply= 1;
- if(etag.s) - pkg_free(etag.s); - etag.s= NULL; - goto done; } } @@ -1232,10 +1228,6 @@ int update_presentity(struct sip_msg* msg, presentity_t* presentity, str* body, } if (sent_reply) *sent_reply= 1;
- if(etag.s) - pkg_free(etag.s); - etag.s= NULL; - if(!body) goto done; } @@ -1266,6 +1258,10 @@ int update_presentity(struct sip_msg* msg, presentity_t* presentity, str* body, pres_dmq_replicate_presentity(presentity, body, new_t, &cur_etag, sphere, &p_ruid, NULL); }
+ if(etag.s) + pkg_free(etag.s); + etag.s= NULL; + if(cur_ruid.s) pkg_free(cur_ruid.s); cur_ruid.s= NULL;