]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/grep.c
Merge branch 'en/ort-perf-batch-9'
[thirdparty/git.git] / builtin / grep.c
index 4e91a253ac3b5fd0cdbd0436018c82fb45bde04c..5de725f904419e3db520cc9bedbfd38808b132f2 100644 (file)
@@ -211,7 +211,7 @@ static void start_threads(struct grep_opt *opt)
                strbuf_init(&todo[i].out, 0);
        }
 
-       threads = xcalloc(num_threads, sizeof(*threads));
+       CALLOC_ARRAY(threads, num_threads);
        for (i = 0; i < num_threads; i++) {
                int err;
                struct grep_opt *o = grep_opt_dup(opt);
@@ -1181,6 +1181,5 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
                run_pager(&opt, prefix);
        clear_pathspec(&pathspec);
        free_grep_patterns(&opt);
-       grep_destroy();
        return !hit;
 }