summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/refdb_fs.c5
-rw-r--r--src/reset.c1
2 files changed, 5 insertions, 1 deletions
diff --git a/src/refdb_fs.c b/src/refdb_fs.c
index 3219b0519..8a26bec0b 100644
--- a/src/refdb_fs.c
+++ b/src/refdb_fs.c
@@ -1343,7 +1343,10 @@ static int refdb_reflog_fs__ensure_log(git_refdb_backend *_backend, const char *
if ((error = retrieve_reflog_path(&path, repo, name)) < 0)
return error;
- return create_new_reflog_file(git_buf_cstr(&path));
+ error = create_new_reflog_file(git_buf_cstr(&path));
+ git_buf_free(&path);
+
+ return error;
}
static int has_reflog(git_repository *repo, const char *name)
diff --git a/src/reset.c b/src/reset.c
index 07fd08863..2a78d312c 100644
--- a/src/reset.c
+++ b/src/reset.c
@@ -167,6 +167,7 @@ cleanup:
git_object_free(commit);
git_index_free(index);
git_tree_free(tree);
+ git_buf_free(&log_message_buf);
return error;
}