From: Lukas Sandström Date: Fri, 18 Nov 2005 16:30:29 +0000 (+0100) Subject: Fix bug introduced by the latest changes to git-pack-redundant X-Git-Tag: v0.99.9k~1^2~10 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=3afd169480f1970baeb54be639a496c71ff1e0a9;hp=c3e24a7d461abaacc16c014ee427b37ab0102ca7;p=git.git Fix bug introduced by the latest changes to git-pack-redundant I forgot to initialize part of the pll struct when copying it. Found by valgrind. Signed-off-by: Lukas Sandström Signed-off-by: Junio C Hamano --- diff --git a/pack-redundant.c b/pack-redundant.c index 51d7341b..36556092 100644 --- a/pack-redundant.c +++ b/pack-redundant.c @@ -439,7 +439,7 @@ void minimize(struct pack_list **min) break; /* ignore all larger permutations */ if (is_superset(perm->pl, missing)) { new_perm = xmalloc(sizeof(struct pll)); - new_perm->pl = perm->pl; + memcpy(new_perm, perm, sizeof(struct pll)); new_perm->next = perm_ok; perm_ok = new_perm; }