Fork me on GitHub

null program

Simple Hash Table Correction

In December I made a post about a simple hash table I had written in C. I got an e-mail from Benoit Rouits ( http://brouits.free.fr/) pointing out a memory leak in ht_destroy() that he found with Valgrind. I had failed to free the main array in the hashtable when it was being destroyed,

free (hashtable->arr);

tags: [ c ]

blog comments powered by Disqus