Sfoglia il codice sorgente

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

- can cause a crash when reloading, reported by Bruno Bresciani
Daniel-Constantin Mierla 14 anni fa
parent
commit
c54b89a3a8
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      modules_k/db_text/dbt_tb.c

+ 1 - 0
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)
 	{