Module: sip-router
Branch: 3.1
Commit: 1425fb2408b13d82528868dc1ad6e97639f7439f
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1425fb2408b13d82528868dc1ad6e97639f7439f

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date:   Mon Oct  3 17:33:21 2011 +0200

db_text(k): init new db text table structure to 0

- can cause a crash when reloading, reported by Bruno Bresciani
(cherry picked from commit c54b89a3a840e032a2a8abc5842b3ea78fa537ba)

---

 modules_k/db_text/dbt_tb.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/modules_k/db_text/dbt_tb.c b/modules_k/db_text/dbt_tb.c
index 2bacfc0..2977316 100644
--- a/modules_k/db_text/dbt_tb.c
+++ b/modules_k/db_text/dbt_tb.c
@@ -149,6 +149,7 @@ dbt_table_p dbt_table_new(const str *_tbname, const str 
*_dbname, const char *pa
        dtp = (dbt_table_p)shm_malloc(sizeof(dbt_table_t));
        if(!dtp)
                goto done;
+       memset(dtp, 0, sizeof(dbt_table_t));
        dtp->name.s = (char*)shm_malloc((_tbname->len+1)*sizeof(char));
        if(!dtp->name.s)
        {


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

Reply via email to