Commit 00998a12 by Ben Straub

Initialize variable

parent 621b50e4
...@@ -265,7 +265,7 @@ static int create_and_configure_origin( ...@@ -265,7 +265,7 @@ static int create_and_configure_origin(
const git_clone_options *options) const git_clone_options *options)
{ {
int error; int error;
git_remote *origin; git_remote *origin = NULL;
if ((error = git_remote_add(&origin, repo, options->remote_name, url)) < 0) if ((error = git_remote_add(&origin, repo, options->remote_name, url)) < 0)
goto on_error; goto on_error;
...@@ -302,7 +302,7 @@ static int create_and_configure_origin( ...@@ -302,7 +302,7 @@ static int create_and_configure_origin(
return 0; return 0;
on_error: on_error:
if (origin) git_remote_free(origin); git_remote_free(origin);
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