Re: [PATCH v7 01/11] dir: free untracked cache when removing it
- From
Stefan Beller <sbeller@google.com>
- Date
- Jan 25, 2016, 19:16 UTC
- Message-ID
- <CAGZ79kYoQFWQCxpGxze=v36PTrC7+EgVOwtfm0kgE_kQoekq1g@mail.gmail.com>
- In-Reply-To
- <1453649304-18121-2-git-send-email-chriscool@tuxfamily.org>
On Sun, Jan 24, 2016 at 7:28 AM, Christian Couder <christian.couder@gmail.com> wrote:
Show 14 quoted lines
> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
> ---
> builtin/update-index.c | 1 +
> 1 file changed, 1 insertion(+)
>
> 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);Do we need to free its members, too? (Or is it empty enough here, that there are no memleaks in there? If this were the case a hint in the commit message would be helpful)
Show 6 quoted lines
> the_index.untracked = NULL; > the_index.cache_changed |= UNTRACKED_CHANGED; > } > -- > 2.7.0.181.gd7ef666.dirty >