From: Elijah Newren Date: Fri, 28 Jan 2022 01:58:18 +0000 (+0000) Subject: sparse-checkout: fix a couple minor memory leaks X-Git-Tag: v2.36.0-rc0~160^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0f03f04c5c24239bafbb4ce1a9dd73d602d052cb;p=thirdparty%2Fgit.git sparse-checkout: fix a couple minor memory leaks These were introduced in commit 55dfcf9591 ("sparse-checkout: clear tracked sparse dirs", 2021-09-08) and missed in my review at the time. Plug the leaks. Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- diff --git a/builtin/sparse-checkout.c b/builtin/sparse-checkout.c index d0f5c4702b..23482d77c9 100644 --- a/builtin/sparse-checkout.c +++ b/builtin/sparse-checkout.c @@ -182,6 +182,8 @@ static void clean_tracked_sparse_directories(struct repository *r) item->string); } + strvec_clear(&s); + clear_pathspec(&p); dir_clear(&dir); }