diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-08-01 12:38:11 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-08-01 08:47:34 -0700 |
| commit | 34968e56de472fa864641abefbaf4a4923b77507 (patch) | |
| tree | 47a3d4fd81db5fcbc4bd672f7b55bb844ce17544 /commit-reach.c | |
| parent | Git 2.46-rc2 (diff) | |
| download | git-34968e56de472fa864641abefbaf4a4923b77507.tar.gz git-34968e56de472fa864641abefbaf4a4923b77507.zip | |
builtin/replay: plug leaking `advance_name` variable
The `advance_name` variable can either contain a static string when
parsed via the `--advance` command line option or it may be an allocated
string when set via `determine_replay_mode()`. Because we cannot be sure
whether it is allocated or not we just didn't free it at all, resulting
in a memory leak.
Split up the variables such that we can track the static and allocated
strings separately and then free the allocated one to fix the memory
leak.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-reach.c')
0 files changed, 0 insertions, 0 deletions
