Skip to content

pr-git-831/newren/dir_memory_cleanup-v1

Some memory leaks in dir.c were making it hard for me to find my own leaks
in merge-ort. I followed a few threads and tried to both clean up the leaks
and make the API less prone to incorrect use.

Elijah Newren (3):
  dir: fix leak of parent_hashmap and recursive_hashmap
  dir: make clear_directory() free all relevant memory
  dir: fix problematic API to avoid memory leaks

 builtin/add.c          |  4 ++--
 builtin/check-ignore.c |  4 ++--
 builtin/clean.c        | 12 ++++--------
 builtin/grep.c         |  3 ++-
 builtin/ls-files.c     |  4 ++--
 builtin/stash.c        |  7 ++-----
 dir.c                  | 23 ++++++++++++++++++-----
 dir.h                  | 21 +++++++++++----------
 merge.c                |  3 ++-
 wt-status.c            |  8 ++------
 10 files changed, 47 insertions(+), 42 deletions(-)

base-commit: 878e727637ec5815ccb3301eb994a54df95b21b8

Submitted-As: https://lore.kernel.org/git/pull.831.git.git.1597561152.gitgitgadget@gmail.com
Assets 2