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:
parent
c98a95eea8
commit
6589ebf107
@ -1356,8 +1356,9 @@ static void remove_locks(void)
|
||||
|
||||
fprintf(stderr, "Removing remote locks...\n");
|
||||
while (lock) {
|
||||
struct remote_lock *next = lock->next;
|
||||
unlock_remote(lock);
|
||||
lock = lock->next;
|
||||
lock = next;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user