Commit 3e8f4703 by Miguel Arroz

Free the correct reference if an error occurrs.

It should be the `new` pointer, not the `old` one.
parent 75b27870
...@@ -1788,7 +1788,7 @@ static int refdb_fs_backend__rename( ...@@ -1788,7 +1788,7 @@ static int refdb_fs_backend__rename(
} }
if ((error = loose_lock(&file, backend, new_name)) < 0) { if ((error = loose_lock(&file, backend, new_name)) < 0) {
git_reference_free(old); git_reference_free(new);
return error; return error;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment