diff mbox series

[11/29] builtin/difftool: plug memory leaks in `run_dir_diff()`

Message ID 8349f6acbd9309f8b50a07c1583b4946d25fdc64.1717402439.git.ps@pks.im (mailing list archive)
State Superseded
Headers show
Series Memory leak fixes (pt.2) | expand

Commit Message

Patrick Steinhardt June 3, 2024, 9:47 a.m. UTC
We're leaking a bunch of memory leaks in `run_dir_diff()`. Plug them.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 builtin/difftool.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/builtin/difftool.c b/builtin/difftool.c
index a130faae4f..63308b1ca7 100644
--- a/builtin/difftool.c
+++ b/builtin/difftool.c
@@ -662,6 +662,9 @@  static int run_dir_diff(const char *extcmd, int symlinks, const char *prefix,
 
 	free(lbase_dir);
 	free(rbase_dir);
+	strbuf_release(&info);
+	strbuf_release(&lpath);
+	strbuf_release(&rpath);
 	strbuf_release(&ldir);
 	strbuf_release(&rdir);
 	strbuf_release(&wtdir);