summaryrefslogtreecommitdiff
path: root/include/git/odb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/git/odb.h')
-rw-r--r--include/git/odb.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/git/odb.h b/include/git/odb.h
index 7c6be4f3f..0d65e1969 100644
--- a/include/git/odb.h
+++ b/include/git/odb.h
@@ -54,9 +54,8 @@ GIT_EXTERN(int) git_odb_open(git_odb **out, const char *objects_dir);
/**
* Close an open object database.
* @param db database pointer to close. If NULL no action is taken.
- * The pointer is set to NULL when the close is completed.
*/
-GIT_EXTERN(void) git_odb_close(git_odb **db);
+GIT_EXTERN(void) git_odb_close(git_odb *db);
/** Basic type (loose or packed) of any Git object. */
typedef enum {
@@ -129,7 +128,11 @@ GIT_EXTERN(int) git_odb__read_loose(git_sobj *out, git_odb *db, const git_oid *i
*
* @param obj object descriptor to free.
*/
-GIT_EXTERN(void) git_sobj_close(git_sobj *obj);
+GIT_INLINE(void) git_sobj_close(git_sobj *obj)
+{
+ free(obj->data);
+ obj->data = NULL;
+}
/** @} */
GIT_END_DECL