Skip to content

Commit e2b3dc1

Browse files
committed
variable 'i' is used uninitialized whenever 'if' condition is true
1 parent 7414acf commit e2b3dc1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/submodule.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,10 @@ static int submodule_get_or_create(git_submodule **out, git_repository *repo, gi
349349
static int submodules_from_index(git_strmap *map, git_index *idx, git_config *cfg)
350350
{
351351
int error;
352-
git_iterator *i;
352+
git_iterator *i = NULL;
353353
const git_index_entry *entry;
354354
git_strmap *names = 0;
355+
355356
git_strmap_alloc(&names);
356357
if ((error = load_submodule_names(names, cfg)))
357358
goto done;

0 commit comments

Comments
 (0)