coccinelle: make use of the "type" FREE_AND_NULL() rule
[gitweb.git] / config.c
index 34a139c40bd57ff2dd23318beca53fd2e2948000..0501a60dd241320b686fa76ff570fd72ff9ce895 100644 (file)
--- a/config.c
+++ b/config.c
@@ -395,8 +395,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;
 }