Files
git/builtin
Junio C Hamano 5b8db44bdd format-patch: unleak "-v <num>"
The "subject_prefix" member of "struct revision" usually is set to a
borrowed string (either a string literal like "PATCH" that appear in
the program text as a hardcoded default, or the value of
"format.subjectprefix") and is never freed when the containing
revision structure is released.  The "-v <num>" codepath however
violates this rule and stores a pointer to an allocated string to
this member, relinquishing the responsibility to free it when it is
done using the revision structure, leading to a small one-time leak.

Instead, keep track of the string it allocates to let the revision
structure borrow, and clean it up when it is done.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-01-16 10:31:45 -08:00
..
2022-04-06 09:42:14 -07:00
2022-10-30 21:04:44 -04:00
2022-11-23 11:22:24 +09:00
2023-01-16 10:31:45 -08:00
2022-11-16 14:57:32 -05:00
2022-11-18 18:43:09 -05:00
2022-11-28 12:13:46 +09:00