Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
[PATCH] Plug memory leak in git-pack-objects
author
Sergey Vlasov
<vsu@altlinux.ru>
Mon, 8 Aug 2005 18:46:58 +0000
(22:46 +0400)
committer
Junio C Hamano
<junkio@cox.net>
Tue, 9 Aug 2005 05:51:46 +0000
(22:51 -0700)
find_deltas() should free its temporary objects before returning.
[jc: Sergey, if you have [PATCH] title on the Subject line of your
e-mail, please do not repeat it on the first line in your message
body. Thanks.]
Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>
pack-objects.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
7bf058f
)
diff --git
a/pack-objects.c
b/pack-objects.c
index ed24a33300e6baa2b64c5f6c28594494a0b3ebdf..3d622787cc554eb2936995441e4591ec1986bded 100644
(file)
--- a/
pack-objects.c
+++ b/
pack-objects.c
@@
-382,6
+382,10
@@
static void find_deltas(struct object_entry **list, int window, int depth)
if (idx >= window)
idx = 0;
}
+
+ for (i = 0; i < window; ++i)
+ free(array[i].data);
+ free(array);
}
int main(int argc, char **argv)