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

kamailio git 1425fb2408b13d82528868dc1ad6e97639f7439f
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)
3.1
Jon Bonilla 14 years ago
parent aac044e8dc
commit 9b8b316e98

@ -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)
{

Loading…
Cancel
Save