diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-08-01 12:39:57 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-08-01 08:47:35 -0700 |
| commit | 6771e2012e15ed3748997566640c34b492c2cf67 (patch) | |
| tree | 5183776ac388eeb51b6d7eab2963d22e9457d571 /commit-reach.c | |
| parent | builtin/submodule--helper: fix leaking clone depth parameter (diff) | |
| download | git-6771e2012e15ed3748997566640c34b492c2cf67.tar.gz git-6771e2012e15ed3748997566640c34b492c2cf67.zip | |
builtin/submodule--helper: fix leaking buffer in `is_tip_reachable`
The `rev` buffer in `is_tip_reachable()` is being populated with the
output of git-rev-list(1) -- if either the command fails or the buffer
contains any data, then the input commit is not reachable.
The buffer isn't used for anything else, but neither do we free it,
causing a memory leak. Fix this.
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
