Skip to content

Commit dee839a

Browse files
committed
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 <[email protected]>
1 parent 69a9c10 commit dee839a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

builtin/log.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2241,6 +2241,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
22412241
strbuf_release(&rdiff1);
22422242
strbuf_release(&rdiff2);
22432243
strbuf_release(&rdiff_title);
2244+
UNLEAK(rev);
22442245
return 0;
22452246
}
22462247

0 commit comments

Comments
 (0)