Commit 32b7e84e by Brodie Rao

oid: handle NULL pointers passed to git_oid_shorten_free()

Signed-off-by: Brodie Rao <brodie@sf.io>
parent ae3b6d61
......@@ -314,6 +314,9 @@ git_oid_shorten *git_oid_shorten_new(size_t min_length)
void git_oid_shorten_free(git_oid_shorten *os)
{
if (os == NULL)
return;
git__free(os->nodes);
git__free(os);
}
......
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