object-name: fix leaking symlink paths in object context
The object context may be populated with symlink contents when reading a symlink, but the associated strbuf doesn't ever get released when releasing the object context, causing a memory leak. Plug it. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
aa9ef614dc
commit
9ddd5f755d
@ -1765,6 +1765,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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user