From 886e1084d78cda218b4d1133e8154e8556f92222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20=C3=85gren?= Date: Sun, 1 Oct 2017 19:42:08 +0200 Subject: builtin/: add UNLEAKs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add some UNLEAKs where we are about to return from `cmd_*`. UNLEAK the variables in the same order as we've declared them. While addressing `msg` in builtin/tag.c, convert the existing `strbuf_release()` calls as well. Signed-off-by: Martin Ă…gren Signed-off-by: Junio C Hamano --- builtin/diff.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'builtin/diff.c') diff --git a/builtin/diff.c b/builtin/diff.c index 7cde6abbcf..0da526cfdb 100644 --- a/builtin/diff.c +++ b/builtin/diff.c @@ -466,5 +466,8 @@ int cmd_diff(int argc, const char **argv, const char *prefix) result = diff_result_code(&rev.diffopt, result); if (1 < rev.diffopt.skip_stat_unmatch) refresh_index_quietly(); + UNLEAK(rev); + UNLEAK(ent); + UNLEAK(blob); return result; } -- cgit v1.2.1