summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/odb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/odb.c b/src/odb.c
index d951bc51b..7c21598f0 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -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);
}