diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-08-07 17:32:56 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-08-07 17:38:31 -0700 |
| commit | 448d51d549179bafe47e07e9434210d48fdf55c6 (patch) | |
| tree | f99347e604815f05ef2640e5c775d8fadb25e47c /builtin/commit.c | |
| parent | The second batch (diff) | |
| download | git-448d51d549179bafe47e07e9434210d48fdf55c6.tar.gz git-448d51d549179bafe47e07e9434210d48fdf55c6.zip | |
transport: fix leak with transport helper URLs
Transport URLs can be prefixed with "foo::", which would tell us that
the transport uses a remote helper called "foo". We extract the helper
name by `xstrndup()`ing the prefix before the double-colons, but never
free that string.
Fix this leak by assigning the result to a separate local variable that
we can then free upon returning.
Helped-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
