Module: kamailio Branch: master Commit: cc9033be4cbbd5330febecaec3c5718703c0267c URL: https://github.com/kamailio/kamailio/commit/cc9033be4cbbd5330febecaec3c57187...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2017-08-11T15:10:38+02:00
tm: use standard shm malloc to store to-tag set
---
Modified: src/modules/tm/t_reply.c
---
Diff: https://github.com/kamailio/kamailio/commit/cc9033be4cbbd5330febecaec3c57187... Patch: https://github.com/kamailio/kamailio/commit/cc9033be4cbbd5330febecaec3c57187...
---
diff --git a/src/modules/tm/t_reply.c b/src/modules/tm/t_reply.c index 795da9cb14..c26b5eca32 100644 --- a/src/modules/tm/t_reply.c +++ b/src/modules/tm/t_reply.c @@ -306,10 +306,8 @@ inline static int update_totag_set(struct cell *t, struct sip_msg *ok) } } /* that's a new to-tag -- record it */ - shm_lock(); - n=(struct totag_elem*) shm_malloc_unsafe(sizeof(struct totag_elem)); - s=(char *)shm_malloc_unsafe(tag->len); - shm_unlock(); + n=(struct totag_elem*) shm_malloc(sizeof(struct totag_elem)); + s=(char *)shm_malloc(tag->len); if (!s || !n) { LM_ERR("no more shm memory \n"); if (n) shm_free(n);