diff options
Diffstat (limited to 'src/config_file.c')
-rw-r--r-- | src/config_file.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/config_file.c b/src/config_file.c index 077e2c03f..e16606512 100644 --- a/src/config_file.c +++ b/src/config_file.c @@ -192,6 +192,9 @@ static int file_foreach(git_config_file *backend, int (*fn)(const char *, const cvar_t *var; const char *key; + if (!b->values) + return 0; + GIT_HASHTABLE_FOREACH(b->values, key, var, do { if (fn(key, var->value, data) < 0) @@ -331,6 +334,7 @@ static int config_get_multivar( var = var->next; } while (var != NULL); + regfree(®ex); } else { /* no regex; go through all the variables */ do { |