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 <lukass@etek.chalmers.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
Lukas Sandström committed
Nov 18, 2005 at 17:30 UTC
3afd169480f1970baeb54be639a496c71ff1e0a9
1 file changed
+1
-1
pack-redundant.c
+1
-1
@@ -439,7 +439,7 @@ void minimize(struct pack_list **min)
439
break; /* ignore all larger permutations */
440
if (is_superset(perm->pl, missing)) {
441
new_perm = xmalloc(sizeof(struct pll));
442
- new_perm->pl = perm->pl;
442
+ memcpy(new_perm, perm, sizeof(struct pll));
443
new_perm->next = perm_ok;
444
perm_ok = new_perm;
445
}