Skip to content

Commit

Permalink
bee-dep: rebuild: fix access of null reference if init_cache failed
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Ruester committed Jan 26, 2012
1 parent 3bb46a8 commit a9a2bac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ void hash_free(struct hash *hash)
{
int i;

if (!hash)
return;

for (i = 0; i < TBLSIZE; i++) {
tree_free_all_nodes(hash->tbl[i]);
tree_free(hash->tbl[i]);
Expand Down

0 comments on commit a9a2bac

Please sign in to comment.