diff options
author | Michael Schubert <schu@schu.io> | 2012-07-01 19:44:22 +0200 |
---|---|---|
committer | Michael Schubert <schu@schu.io> | 2012-10-09 21:28:31 +0200 |
commit | edca6c8fed0a95c1308cbef1edb5a0ace25889b7 (patch) | |
tree | fa23f526f0ee72675fc217e27f55a32a52aafe4b /src | |
parent | 4bc1a30f135db3edbcddf8a548f00353c54dacd8 (diff) | |
download | libgit2-edca6c8fed0a95c1308cbef1edb5a0ace25889b7.tar.gz |
git_odb_object_free: don't segfault w/ arg == NULL
Diffstat (limited to 'src')
-rw-r--r-- | src/odb.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -107,6 +107,9 @@ git_otype git_odb_object_type(git_odb_object *object) void git_odb_object_free(git_odb_object *object) { + if (object == NULL) + return; + git_cached_obj_decref((git_cached_obj *)object, &free_odb_object); } |