use do() instead of require() to include configuration
[gitweb.git] / config.c
index 82b35624543a2e50d80cafab15b63df0152adbc0..d9f2b787b94f2506ff7842c1b7b06bd15342ba6f 100644 (file)
--- a/config.c
+++ b/config.c
@@ -361,8 +361,7 @@ int git_config(config_fn_t fn)
        }
 
        ret += git_config_from_file(fn, filename);
-       if (repo_config)
-               free(repo_config);
+       free(repo_config);
        return ret;
 }
 
@@ -734,8 +733,7 @@ int git_config_set_multivar(const char* key, const char* value,
 out_free:
        if (0 <= fd)
                close(fd);
-       if (config_filename)
-               free(config_filename);
+       free(config_filename);
        if (lock_file) {
                unlink(lock_file);
                free(lock_file);