commit 5f42e012bf1e465b1053e2ee9ba0cbb097643169 from: Kyle Ackerman via: Thomas Adam date: Sat Dec 09 13:03:00 2023 UTC plug memleak of the ignore list in 'got status' Found/reported and patch by Kyle Ackerman. ok op@ commit - 978394e7c1b381b6d87cda75ebfaf507bb01ec64 commit + 5f42e012bf1e465b1053e2ee9ba0cbb097643169 blob - a2684892d360bb130f2bc0cf50f539c75321e256 blob + ff64a388103547c0e446f9343db78dc250cb60cf --- lib/worktree.c +++ lib/worktree.c @@ -3719,7 +3719,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 * @@ -3774,6 +3774,7 @@ done: if (err || pe == NULL) { free(dirpath); got_pathlist_free(ignorelist, GOT_PATHLIST_FREE_PATH); + free(ignorelist); } return err; }