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 <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Elijah Newren committed Jan 28, 2022 at 01:58 UTC 0f03f04c5c24239bafbb4ce1a9dd73d602d052cb
1 file changed +2
builtin/sparse-checkout.c
+2
@@ -182,6 +182,8 @@ static void clean_tracked_sparse_directories(struct repository *r)
182 item->string);
183 }
184
185 + strvec_clear(&s);
186 + clear_pathspec(&p);
187 dir_clear(&dir);
188 }
189