[PATCH/RFC 0/7] Re: [PATCH] memory leak reported by valgrind
From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:49:40
Jonathan Nieder wrote:
Could something like leaky() be used to insert an artificial stack frame at allocation time to make suppressions simpler to write?
Yes, I think it could. Thanks to Pierre Habouzit for the initial idea and David Barr for advice on the execution. Thoughts? Bugs? Improvements? Jonathan Nieder (7): init: plug tiny memory leak lockfile: introduce alloc_lock_file() to avoid valgrind noise environment.c: remove unused variable setup: make sure git dir path is in a permanent buffer Introduce malloc/strdup/pathdup variants for permanent allocations environment: use alloc_permanent() for computed git_dir and co commit-tree: free commit message before exiting Documentation/technical/api-lockfile.txt | 9 ++++++++ builtin/commit-tree.c | 12 ++++++---- builtin/init-db.c | 32 +++++++++++++++++------------ builtin/update-index.c | 4 +-- cache-tree.c | 7 +----- cache.h | 3 ++ config.c | 2 +- environment.c | 14 ++++++------ git-compat-util.h | 2 + lockfile.c | 6 +++++ path.c | 10 +++++++++ t/valgrind/default.supp | 25 +++++++++++++++++++++++ wrapper.c | 14 +++++++++++++ 13 files changed, 105 insertions(+), 35 deletions(-) -- 1.7.2.3