From 9624a22ac603d3d59622b1f45a62d02f5fe55a25 Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Tue, 29 Dec 2015 08:09:25 +0100 Subject: dir: free untracked cache when removing it Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano diff --git a/builtin/update-index.c b/builtin/update-index.c index 7431938..a6fff87 100644 --- a/builtin/update-index.c +++ b/builtin/update-index.c @@ -1123,6 +1123,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix) add_untracked_ident(the_index.untracked); the_index.cache_changed |= UNTRACKED_CHANGED; } else if (!untracked_cache && the_index.untracked) { + free_untracked_cache(the_index.untracked); the_index.untracked = NULL; the_index.cache_changed |= UNTRACKED_CHANGED; } -- cgit v0.10.2-6-g49f6