diff options
author | Brodie Rao <brodie@sf.io> | 2014-01-12 23:31:35 -0800 |
---|---|---|
committer | Brodie Rao <brodie@sf.io> | 2014-01-12 23:34:02 -0800 |
commit | 32b7e84ec09170761bf9422cc4139be0b14975a9 (patch) | |
tree | f6032fd67de02b4236d1118ca222f666d5a56a4a /src/oid.c | |
parent | ae3b6d612db6305a20e1139503b3c9e99cf4632a (diff) | |
download | libgit2-32b7e84ec09170761bf9422cc4139be0b14975a9.tar.gz |
oid: handle NULL pointers passed to git_oid_shorten_free()
Signed-off-by: Brodie Rao <brodie@sf.io>
Diffstat (limited to 'src/oid.c')
-rw-r--r-- | src/oid.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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); } |