mirror of
https://github.com/git/git
synced 2024-08-25 02:35:46 +00:00
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 <gitster@pobox.com>
This commit is contained in:
parent
69a9c10c95
commit
dee839a263
|
@ -2241,6 +2241,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
|
|||
strbuf_release(&rdiff1);
|
||||
strbuf_release(&rdiff2);
|
||||
strbuf_release(&rdiff_title);
|
||||
UNLEAK(rev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue