author | Johannes Sixt <johannes.sixt@telecom.at> | |
Mon, 17 Dec 2007 19:12:52 +0000 (20:12 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 18 Dec 2007 00:08:40 +0000 (16:08 -0800) | ||
commit | 68e6a4f80d4bea2d281c30fa2bbcd4968b0ccc4e | |
tree | c544c7a588a48b6d0a310cd46f7114cc99a69ee8 | tree | snapshot |
parent | 6fbe42c7ee99b4cafa792b46a16b0158d305fe29 | commit | diff |
Plug a resource leak in threaded pack-objects code.
A mutex and a condition variable is allocated for each thread and torn
down when the thread terminates. However, for certain workloads it can
happen that some threads are actually not started at all. In this case
we would leak the mutex and condition variable. Now we allocate them only
for those threads that are actually started.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
A mutex and a condition variable is allocated for each thread and torn
down when the thread terminates. However, for certain workloads it can
happen that some threads are actually not started at all. In this case
we would leak the mutex and condition variable. Now we allocate them only
for those threads that are actually started.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-pack-objects.c | diff | blob | history |