Commit d58afb17 by Nelson Elhage

git_smart__connect: free symrefs on error

parent cf335928
......@@ -274,8 +274,10 @@ static int git_smart__connect(
return error;
/* Detect capabilities */
if (git_smart__detect_caps(first, &t->caps, &symrefs) < 0)
if (git_smart__detect_caps(first, &t->caps, &symrefs) < 0) {
free_symrefs(&symrefs);
return -1;
}
/* If the only ref in the list is capabilities^{} with OID_ZERO, remove it */
if (1 == t->refs.length && !strcmp(first->head.name, "capabilities^{}") &&
......
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