[PATCH] Plug memory leak in git-pack-objects

find_deltas() should free its temporary objects before returning.

Signed-off-by: Sergey Vlasov <[EMAIL PROTECTED]>
---

 pack-objects.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

8b38f80b97affd0d9808b8f276a9e2e04bf03464
diff --git a/pack-objects.c b/pack-objects.c
--- a/pack-objects.c
+++ b/pack-objects.c
@@ -382,6 +382,10 @@ static void find_deltas(struct object_en
                if (idx >= window)
                        idx = 0;
        }
+
+       for (i = 0; i < window; ++i)
+               free(array[i].data);
+       free(array);
 }
 
 int main(int argc, char **argv)
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to