From 3afd169480f1970baeb54be639a496c71ff1e0a9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lukas=20Sandstr=C3=B6m?= Date: Fri, 18 Nov 2005 17:30:29 +0100 Subject: [PATCH] Fix bug introduced by the latest changes to git-pack-redundant MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- pack-redundant.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.11.0