summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-06-11 11:21:25 +0200
committerJunio C Hamano <gitster@pobox.com>2024-06-11 13:15:08 -0700
commit3332f35577ccbb51a50d88d16caafcceaab23767 (patch)
treefc04475a6d497eebc65cfb9a78b7a625892875be /builtin/commit.c
parentee6a998583108cebc0db28d70df2aa1b547b6251 (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 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions