1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-10 14:36:48 +02:00

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>
This commit is contained in:
Elijah Newren 2022-01-28 01:58:18 +00:00 committed by Junio C Hamano
parent 55dfcf9591
commit 0f03f04c5c

View File

@ -182,6 +182,8 @@ static void clean_tracked_sparse_directories(struct repository *r)
item->string);
}
strvec_clear(&s);
clear_pathspec(&p);
dir_clear(&dir);
}