summaryrefslogtreecommitdiffstats
path: root/object-name.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-08-23 18:02:33 +0200
committerJunio C Hamano <gitster@pobox.com>2024-08-23 18:02:33 +0200
commit1b6b2bfae582e1e5a9b9ad2ef15985f69ade0fce (patch)
treee92ce38ee06174dcff67406f37a9a5f2c6566053 /object-name.c
parentThe seventh batch (diff)
parentbuiltin/diff: free symmetric diff members (diff)
downloadgit-1b6b2bfae582e1e5a9b9ad2ef15985f69ade0fce.tar.xz
git-1b6b2bfae582e1e5a9b9ad2ef15985f69ade0fce.zip
Merge branch 'ps/leakfixes-part-4'
More leak fixes. * ps/leakfixes-part-4: (22 commits) builtin/diff: free symmetric diff members diff: free state populated via options builtin/log: fix leak when showing converted blob contents userdiff: fix leaking memory for configured diff drivers builtin/format-patch: fix various trivial memory leaks diff: fix leak when parsing invalid ignore regex option unpack-trees: clear index when not propagating it sequencer: release todo list on error paths merge-ort: unconditionally release attributes index builtin/fast-export: plug leaking tag names builtin/fast-export: fix leaking diff options builtin/fast-import: plug trivial memory leaks builtin/notes: fix leaking `struct notes_tree` when merging notes builtin/rebase: fix leaking `commit.gpgsign` value config: fix leaking comment character config submodule-config: fix leaking name entry when traversing submodules read-cache: fix leaking hashfile when writing index fails bulk-checkin: fix leaking state TODO object-name: fix leaking symlink paths in object context object-file: fix memory leak when reading corrupted headers ...
Diffstat (limited to 'object-name.c')
-rw-r--r--object-name.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/object-name.c b/object-name.c
index f340b740c5..09c1bd93a3 100644
--- a/object-name.c
+++ b/object-name.c
@@ -1772,6 +1772,7 @@ int strbuf_check_branch_ref(struct strbuf *sb, const char *name)
void object_context_release(struct object_context *ctx)
{
free(ctx->path);
+ strbuf_release(&ctx->symlink_path);
}
/*