1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-25 05:47:24 +02:00

http-push.c::remove_locks(): fix use after free

Noticed and reported by Serhat Şevki Dinçer.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Acked-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Alex Riesen 2009-05-24 15:16:49 +02:00 committed by Junio C Hamano
parent c98a95eea8
commit 6589ebf107

View File

@ -1356,8 +1356,9 @@ static void remove_locks(void)
fprintf(stderr, "Removing remote locks...\n"); fprintf(stderr, "Removing remote locks...\n");
while (lock) { while (lock) {
struct remote_lock *next = lock->next;
unlock_remote(lock); unlock_remote(lock);
lock = lock->next; lock = next;
} }
} }