diff options
| author | Jacob Keller <jacob.keller@gmail.com> | 2025-06-23 16:11:30 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-06-23 16:38:56 -0700 |
| commit | 2084f119b4d8252116493336f597d205cfa8f0b8 (patch) | |
| tree | 1da3bb90ca5b5e6ddb36a38adfc9bfd3d151c3a6 /builtin/commit-tree.c | |
| parent | remote: remove branch->merge_name and fix branch_release() (diff) | |
| download | git-2084f119b4d8252116493336f597d205cfa8f0b8.tar.gz git-2084f119b4d8252116493336f597d205cfa8f0b8.zip | |
remote: fix tear down of struct remote
The remote_clear() function failed to free the remote->push and
remote->fetch refspec fields.
This should be caught by the leak sanitizer. However, for callers which
use ``the_repository``, the values never go out of scope and the
sanitizer doesn't complain.
A future change is going to add a caller of read_config() for a
submodule repository structure, which would result in the leak sanitizer
complaining.
Fix remote_clear(), updating it to properly call refspec_clear() for
both the push and fetch members.
Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-tree.c')
0 files changed, 0 insertions, 0 deletions
