summaryrefslogtreecommitdiff
path: root/src/remote.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2015-06-07 10:45:39 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2015-06-07 10:45:39 +0200
commit2785544fb51ec0ee439510f070f769fe66ccfdc7 (patch)
treea9a9b5ecae63cebcc018ebad08f82a6882122522 /src/remote.c
parentbabdc376c7a0ed698ada5f0512789bd99a8b2c4a (diff)
downloadlibgit2-2785544fb51ec0ee439510f070f769fe66ccfdc7.tar.gz
remote: some error-handling issues from Coverity
Diffstat (limited to 'src/remote.c')
-rw-r--r--src/remote.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/remote.c b/src/remote.c
index b7acbb9c1..63f6d3462 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -869,7 +869,7 @@ int git_remote_download(git_remote *remote, const git_strarray *refspecs, const
{
int error = -1;
size_t i;
- git_vector refs, specs, *to_active;
+ git_vector *to_active, specs = GIT_VECTOR_INIT, refs = GIT_VECTOR_INIT;
const git_remote_callbacks *cbs = NULL;
assert(remote);
@@ -2451,7 +2451,8 @@ char *apply_insteadof(git_config *config, const char *url, int direction)
suffix_length = strlen(SUFFIX_PUSH) + 1;
}
- git_config_iterator_glob_new(&iter, config, regexp);
+ if (git_config_iterator_glob_new(&iter, config, regexp) < 0)
+ return NULL;
match_length = 0;
while (git_config_next(&entry, iter) == 0) {