Skip to content

Commit 4abc578

Browse files
dschogitster
authored andcommitted
fsmonitor: do not forget to release the token in discard_index()
In 56c6910 (fsmonitor: change last update timestamp on the index_state to opaque token, 2020-01-07), we forgot to adjust `discard_index()` to release the "last-update" token: it is no longer a 64-bit number, but a free-form string that has been allocated. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3dfd305 commit 4abc578

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

read-cache.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2355,6 +2355,7 @@ int discard_index(struct index_state *istate)
23552355
cache_tree_free(&(istate->cache_tree));
23562356
istate->initialized = 0;
23572357
istate->fsmonitor_has_run_once = 0;
2358+
FREE_AND_NULL(istate->fsmonitor_last_update);
23582359
FREE_AND_NULL(istate->cache);
23592360
istate->cache_alloc = 0;
23602361
discard_split_index(istate);

0 commit comments

Comments
 (0)