oid: handle NULL pointers passed to git_oid_shorten_free()

Signed-off-by: Brodie Rao <brodie@sf.io>
This commit is contained in:
Brodie Rao 2014-01-12 23:31:35 -08:00
parent ae3b6d612d
commit 32b7e84ec0

View File

@ -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);
}