Commit 704554cd by Patrick Steinhardt

transports: smart: fix memory leak on OOM path

parent 038d7af0
......@@ -108,6 +108,7 @@ static int append_symref(const char **out, git_vector *symrefs, const char *ptr)
if (giterr_last()->klass != GITERR_NOMEMORY)
goto on_invalid;
git__free(mapping);
return error;
}
......@@ -120,6 +121,7 @@ static int append_symref(const char **out, git_vector *symrefs, const char *ptr)
on_invalid:
giterr_set(GITERR_NET, "remote sent invalid symref");
git_refspec__free(mapping);
git__free(mapping);
return -1;
}
......
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