coccinelle: make use of the "type" FREE_AND_NULL() rule
[gitweb.git] / pathspec.c
index 828405021fca4214585e1d46b65f604d14e61143..54aab8bc0146c6f2213993f40f5a3b3ac026569a 100644 (file)
@@ -662,7 +662,6 @@ void clear_pathspec(struct pathspec *pathspec)
                        attr_check_free(pathspec->items[i].attr_check);
        }
 
-       free(pathspec->items);
-       pathspec->items = NULL;
+       FREE_AND_NULL(pathspec->items);
        pathspec->nr = 0;
 }