Skip to content

Commit

Permalink
mh_contents rwlock is not initialised
Browse files Browse the repository at this point in the history
  • Loading branch information
lundman committed Mar 9, 2016
1 parent 19fb55f commit b8f2cc6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions module/icp/os/modhash.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,8 @@ mod_hash_create_extended(
mod_hash->mh_hashalg_data = hash_alg_data;
mod_hash->mh_keycmp = keycmp;

rw_init(&mod_hash->mh_contents, NULL, RW_DEFAULT, NULL);

/*
* Link the hash up on the list of hashes
*/
Expand Down Expand Up @@ -523,6 +525,8 @@ mod_hash_destroy_hash(mod_hash_t *hash)
*/
mod_hash_clear(hash);

rw_destroy(&hash->mh_contents);

kmem_free(hash->mh_name, strlen(hash->mh_name) + 1);
kmem_free(hash, MH_SIZE(hash->mh_nchains));
}
Expand Down

0 comments on commit b8f2cc6

Please sign in to comment.