summaryrefslogtreecommitdiff
path: root/src/clone.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-05-22 12:28:39 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2014-05-22 12:28:39 +0200
commit4c4408c351650dac84c81a67a321a4d92cc85ffa (patch)
tree4fc65c781b55e7092f8e58b34a5c5bd65f2af7f6 /src/clone.c
parenta598264463442da0013d6e8b6a0c93d075e14d3a (diff)
downloadlibgit2-4c4408c351650dac84c81a67a321a4d92cc85ffa.tar.gz
Plug leaks and fix a C99-ism
We have too many places where we repeat free code, so when adding the new free to the generic code, it didn't take for the local transport. While there, fix a C99-ism that sneaked through.
Diffstat (limited to 'src/clone.c')
-rw-r--r--src/clone.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/clone.c b/src/clone.c
index f19771c1e..8381ec63c 100644
--- a/src/clone.c
+++ b/src/clone.c
@@ -113,11 +113,12 @@ static int update_head_to_new_branch(
const char *reflog_message)
{
git_reference *tracking_branch = NULL;
+ int error;
if (!git__prefixcmp(name, GIT_REFS_HEADS_DIR))
name += strlen(GIT_REFS_HEADS_DIR);
- int error = create_tracking_branch(&tracking_branch, repo, target, name,
+ error = create_tracking_branch(&tracking_branch, repo, target, name,
signature, reflog_message);
if (!error)