Repositories » libk0
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

Check for NULL lists in hash table.

Changeset c2df918de664

Parent 148f8144e7c9

by Rup Palchowdhury

Changes to one file · Browse files at c2df918de664 Showing diff from parent 148f8144e7c9 Diff from another changeset...

Change 1 of 1 Show Entire File khash.c Stacked
 
19
20
21
22
 
 
23
 
24
25
26
 
19
20
21
 
22
23
24
25
26
27
28
@@ -19,8 +19,10 @@
   void freehash(Hash *h, void (*freedata)(void*))  { - for (int i = 0; i < h->n; i++) + for (int i = 0; i < h->n; i++) { + if (h->tab[i] == NULL) continue;   freelist(h->tab[i], freedata); + }   free(h);  }