Commit 7135e77a623cf1ab972c4bb318c22b403e9d03c2

Vicent Martí 2013-11-19T03:13:23

Merge pull request #1967 from victorgp/cleaning-code-minor-change Cleaning code, removing unused variables

diff --git a/src/remote.c b/src/remote.c
index a032f00..3d890a5 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -219,7 +219,6 @@ on_error:
 
 int git_remote_create_with_fetchspec(git_remote **out, git_repository *repo, const char *name, const char *url, const char *fetch)
 {
-	git_buf buf = GIT_BUF_INIT;
 	git_remote *remote = NULL;
 	int error;
 
@@ -232,8 +231,6 @@ int git_remote_create_with_fetchspec(git_remote **out, git_repository *repo, con
 	if (create_internal(&remote, repo, name, url, fetch) < 0)
 		goto on_error;
 
-	git_buf_free(&buf);
-
 	if (git_remote_save(remote) < 0)
 		goto on_error;
 
@@ -242,7 +239,6 @@ int git_remote_create_with_fetchspec(git_remote **out, git_repository *repo, con
 	return 0;
 
 on_error:
-	git_buf_free(&buf);
 	git_remote_free(remote);
 	return -1;
 }