mirror of
https://git.proxmox.com/git/libgit2
synced 2025-06-25 10:48:44 +00:00
Initialize variable
This commit is contained in:
parent
621b50e4d5
commit
00998a12ca
@ -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(
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
on_error:
|
on_error:
|
||||||
if (origin) git_remote_free(origin);
|
git_remote_free(origin);
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user