Skip to content

Commit

Permalink
cache: clear a pointer on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yata committed Apr 6, 2016
1 parent 3499318 commit cd7148e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ grn_cache_open(grn_ctx *ctx)
if (!cache->hash) {
ERR(GRN_NO_MEMORY_AVAILABLE, "[cache] failed to create hash table");
GRN_FREE(cache);
cache = NULL;
goto exit;
}
MUTEX_INIT(cache->mutex);
Expand Down

0 comments on commit cd7148e

Please sign in to comment.