mirror of
https://github.com/git/git.git
synced 2024-11-24 02:17:02 +08:00
[PATCH] Plug memory leak in git-pack-objects
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>
This commit is contained in:
parent
7bf058f008
commit
adee7bdf50
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user