From dee839a26331a67f5018e10edb158bdb550d3a32 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 16 Dec 2021 15:37:10 -0800 Subject: [PATCH] format-patch: mark rev_info with UNLEAK The comand uses a single instance of rev_info on stack, makes a single revision traversal and exit. Mark the resources held by the rev_info structure with UNLEAK(). We do not do this at lower level in revision.c or cmd_log_walk(), as a new caller of the revision traversal API can make unbounded number of rev_info during a single run, and UNLEAK() would not a be suitable mechanism to deal with such a caller. Signed-off-by: Junio C Hamano --- builtin/log.c | 1 + 1 file changed, 1 insertion(+) diff --git a/builtin/log.c b/builtin/log.c index f75d87e8d7..a7bca8353b 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -2241,6 +2241,7 @@ done: strbuf_release(&rdiff1); strbuf_release(&rdiff2); strbuf_release(&rdiff_title); + UNLEAK(rev); return 0; } -- 2.39.5