diff options
| author | Ben Straub <bs@github.com> | 2012-12-19 16:51:58 -0800 |
|---|---|---|
| committer | Ben Straub <bs@github.com> | 2012-12-19 17:02:06 -0800 |
| commit | 00998a12ca18df381e661c5f39ee15b0984b3e67 (patch) | |
| tree | 3178f09792b65afb4814454d432cdd995510d6c0 /src/clone.c | |
| parent | 621b50e4d55e98870b575b418a9b6fc8a024c65e (diff) | |
| download | libgit2-00998a12ca18df381e661c5f39ee15b0984b3e67.tar.gz | |
Initialize variable
Diffstat (limited to 'src/clone.c')
| -rw-r--r-- | src/clone.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/clone.c b/src/clone.c index 7e3427b5b..fae2458ca 100644 --- a/src/clone.c +++ b/src/clone.c @@ -265,7 +265,7 @@ static int create_and_configure_origin( const git_clone_options *options) { int error; - git_remote *origin; + git_remote *origin = NULL; if ((error = git_remote_add(&origin, repo, options->remote_name, url)) < 0) goto on_error; @@ -302,7 +302,7 @@ static int create_and_configure_origin( return 0; on_error: - if (origin) git_remote_free(origin); + git_remote_free(origin); return error; } |
