diff options
author | Etienne Samson <samson.etienne@gmail.com> | 2017-01-23 13:29:47 +0100 |
---|---|---|
committer | Etienne Samson <samson.etienne@gmail.com> | 2017-01-23 13:32:34 +0100 |
commit | e2b3dc16b904b4989e076ec263da429724e7294b (patch) | |
tree | c6519aa5c3c7606d3a1a7160ad0462cf907da8d2 /src/submodule.c | |
parent | 7414acf5f97c0be1fec0504a61624be3eb814f2f (diff) | |
download | libgit2-e2b3dc16b904b4989e076ec263da429724e7294b.tar.gz |
variable 'i' is used uninitialized whenever 'if' condition is true
Diffstat (limited to 'src/submodule.c')
-rw-r--r-- | src/submodule.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/submodule.c b/src/submodule.c index 21e3d45e4..e1f59b88e 100644 --- a/src/submodule.c +++ b/src/submodule.c @@ -349,9 +349,10 @@ done: static int submodules_from_index(git_strmap *map, git_index *idx, git_config *cfg) { int error; - git_iterator *i; + git_iterator *i = NULL; const git_index_entry *entry; git_strmap *names = 0; + git_strmap_alloc(&names); if ((error = load_submodule_names(names, cfg))) goto done; |