diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-06-11 11:21:25 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-06-11 13:15:08 -0700 |
commit | 3332f35577ccbb51a50d88d16caafcceaab23767 (patch) | |
tree | fc04475a6d497eebc65cfb9a78b7a625892875be /notes-merge.c | |
parent | ee6a998583108cebc0db28d70df2aa1b547b6251 (diff) |
builtin/blame: fix leaking prefixed paths
In `cmd_blame()` we compute prefixed paths by calling `add_prefix()`,
which itself calls `prefix_path()`. While `prefix_path()` returns an
allocated string, `add_prefix()` pretends to return a constant string.
Consequently, this path never gets freed.
Fix the return type to be `char *` and free the path to plug the memory
leak.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'notes-merge.c')
0 files changed, 0 insertions, 0 deletions