Commit 90f81f9f by Patrick Steinhardt

transports: local: fix memory leak in reference walk

Upon downloading the pack file, the local transport will iterate through
every reference using `git_reference_foreach`. The function is a bit
tricky though in that it requires the passed callback to free the
references, which does not currently happen.

Fix the memory leak by freeing all passed references in the callback.
parent 093e671e
......@@ -519,6 +519,8 @@ static int foreach_reference_cb(git_reference *reference, void *payload)
error = 0;
}
git_reference_free(reference);
return error;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment