Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ ts_cache_invalidate(Cache **cache_ptr)
return;
cache->refcount--;
cache_destroy(cache_ptr);
/*
* Even if the cache stays alive due to pins, clear the caller
* pointer so that it cannot be reused. The cache itself will be
* freed with the last pin release (see remove_pin).
*/
*cache_ptr = NULL;
}

/*
Expand Down
Loading