Skip to content

Commit 9624a22

Browse files
chriscoolgitster
authored andcommitted
dir: free untracked cache when removing it
Signed-off-by: Christian Couder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f900c83 commit 9624a22

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

builtin/update-index.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,6 +1123,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
11231123
add_untracked_ident(the_index.untracked);
11241124
the_index.cache_changed |= UNTRACKED_CHANGED;
11251125
} else if (!untracked_cache && the_index.untracked) {
1126+
free_untracked_cache(the_index.untracked);
11261127
the_index.untracked = NULL;
11271128
the_index.cache_changed |= UNTRACKED_CHANGED;
11281129
}

0 commit comments

Comments
 (0)