Merge branch 'ab/wildmatch'
[gitweb.git] / config.c
index be1c640a4c845bcee1b04f232ea47deda76377d1..a9356c1383861ecf7f33ee0262c8a60bbe20864f 100644 (file)
--- a/config.c
+++ b/config.c
@@ -238,7 +238,7 @@ static int include_by_gitdir(const struct config_options *opts,
        }
 
        ret = !wildmatch(pattern.buf + prefix, text.buf + prefix,
-                        icase ? WM_CASEFOLD : 0, NULL);
+                        icase ? WM_CASEFOLD : 0);
 
        if (!ret && !already_tried_absolute) {
                /*
@@ -388,8 +388,7 @@ static int git_config_parse_key_1(const char *key, char **store_key, int *basele
 
 out_free_ret_1:
        if (store_key) {
-               free(*store_key);
-               *store_key = NULL;
+               FREE_AND_NULL(*store_key);
        }
        return -CONFIG_INVALID_KEY;
 }