commit 8fd0d1965f6393cf1ae1776daee76543055e0dd8 from: Kyle Ackerman via: Mark Jamsek date: Fri Dec 08 12:36:12 2023 UTC plug memleak of the ignore list in 'got status' Found/reported and patch by Kyle Ackerman. ok op@ commit - 723721e290eec4393f8cad56a6bb38ca9fd379c7 commit + 8fd0d1965f6393cf1ae1776daee76543055e0dd8 blob - 4415674d74999e7b6fef5dd651fa76682cc19ca1 blob + 560592caa439af0f42f7fefe1abbe084f232c2bf --- lib/worktree.c +++ lib/worktree.c @@ -3722,7 +3722,7 @@ free_ignores(struct got_pathlist_head *ignores) got_pathlist_free(ignorelist, GOT_PATHLIST_FREE_PATH); } - got_pathlist_free(ignores, GOT_PATHLIST_FREE_PATH); + got_pathlist_free(ignores, GOT_PATHLIST_FREE_ALL); } static const struct got_error * @@ -3777,6 +3777,7 @@ done: if (err || pe == NULL) { free(dirpath); got_pathlist_free(ignorelist, GOT_PATHLIST_FREE_PATH); + free(ignorelist); } return err; }