diff options
Diffstat (limited to 'builtin-pack-objects.c')
| -rw-r--r-- | builtin-pack-objects.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c index 9cc8a8451d..1ff2ce6df4 100644 --- a/builtin-pack-objects.c +++ b/builtin-pack-objects.c @@ -1599,7 +1599,7 @@ static void *threaded_find_deltas(void *arg) static void ll_find_deltas(struct object_entry **list, unsigned list_size, int window, int depth, unsigned *processed) { - struct thread_params p[delta_search_threads]; + struct thread_params *p; int i, ret, active_threads = 0; if (delta_search_threads <= 1) { @@ -1609,6 +1609,7 @@ static void ll_find_deltas(struct object_entry **list, unsigned list_size, if (progress > pack_to_stdout) fprintf(stderr, "Delta compression using up to %d threads.\n", delta_search_threads); + p = xcalloc(delta_search_threads, sizeof(*p)); /* Partition the work amongst work threads. */ for (i = 0; i < delta_search_threads; i++) { @@ -1717,6 +1718,7 @@ static void ll_find_deltas(struct object_entry **list, unsigned list_size, active_threads--; } } + free(p); } #else @@ -1808,7 +1810,7 @@ static void prepare_pack(int window, int depth) static int git_pack_config(const char *k, const char *v, void *cb) { - if(!strcmp(k, "pack.window")) { + if (!strcmp(k, "pack.window")) { window = git_config_int(k, v); return 0; } @@ -2098,6 +2100,8 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix) int rp_ac_alloc = 64; int rp_ac; + read_replace_refs = 0; + rp_av = xcalloc(rp_ac_alloc, sizeof(*rp_av)); rp_av[0] = "pack-objects"; |
