Module: kamailio
Branch: master
Commit: 66b9c4dc56e14cac8ffcb0f87d29be4858dafbd3
URL: 
https://github.com/kamailio/kamailio/commit/66b9c4dc56e14cac8ffcb0f87d29be4858dafbd3

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2015-09-21T21:10:47+02:00

mem: f_malloc - safety init of nxt_free fields in first and last fragments

---

Modified: mem/f_malloc.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/66b9c4dc56e14cac8ffcb0f87d29be4858dafbd3.diff
Patch: 
https://github.com/kamailio/kamailio/commit/66b9c4dc56e14cac8ffcb0f87d29be4858dafbd3.patch

---

diff --git a/mem/f_malloc.c b/mem/f_malloc.c
index 2221d54..e94703a 100644
--- a/mem/f_malloc.c
+++ b/mem/f_malloc.c
@@ -367,9 +367,11 @@ struct fm_block* fm_malloc_init(char* address, unsigned 
long size, int type)
        /* init first fragment*/
        qm->first_frag->size=size;
        qm->first_frag->prv_free=0;
+       qm->first_frag->u.nxt_free=0;
        /* init last fragment*/
        qm->last_frag->size=0;
        qm->last_frag->prv_free=0;
+       qm->last_frag->u.nxt_free=0;
        
 #ifdef DBG_F_MALLOC
        qm->first_frag->check=ST_CHECK_PATTERN;


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to