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:
parent
c98a95eea8
commit
6589ebf107
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue