Module: kamailio Branch: 5.3 Commit: b7efdb12dd2e98c03c38565556169b553b8b6a0a URL: https://github.com/kamailio/kamailio/commit/b7efdb12dd2e98c03c38565556169b553b8b6a0a
Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Henning Westerholt <h...@skalatan.de> Date: 2020-09-09T14:42:25Z core: skip abort() in free_lump() for LUMPFLAG_DUPED - the LUMPFLAG_DUPED is set when duplicating lumps list for branch route execution, but some functions such as set_body() may want to clean them - report and minimal reproducing config by Henning Westerholt (cherry picked from commit 57ee97f52dd90c86743b6fd6dd682285ef994e80) --- Modified: src/core/data_lump.c --- Diff: https://github.com/kamailio/kamailio/commit/b7efdb12dd2e98c03c38565556169b553b8b6a0a.diff Patch: https://github.com/kamailio/kamailio/commit/b7efdb12dd2e98c03c38565556169b553b8b6a0a.patch --- diff --git a/src/core/data_lump.c b/src/core/data_lump.c index 765dd5f988..a9a4880199 100644 --- a/src/core/data_lump.c +++ b/src/core/data_lump.c @@ -456,14 +456,17 @@ struct lump* anchor_lump2(struct sip_msg* msg, int offset, int len, } +/** + * free lump content + */ void free_lump(struct lump* lmp) { - if (lmp && (lmp->op==LUMP_ADD)){ - if (lmp->u.value){ - if (lmp->flags &(LUMPFLAG_DUPED|LUMPFLAG_SHMEM)){ + if (lmp && (lmp->op==LUMP_ADD)) { + if (lmp->u.value) { + if (lmp->flags & LUMPFLAG_SHMEM) { LM_CRIT("non free-able lump: %p flags=%x\n", lmp, lmp->flags); abort(); - }else{ + } else if(!(lmp->flags & LUMPFLAG_DUPED)) { pkg_free(lmp->u.value); lmp->u.value=0; lmp->len=0; _______________________________________________ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev