From: Alex Riesen Date: Sun, 24 May 2009 13:16:49 +0000 (+0200) Subject: http-push.c::remove_locks(): fix use after free X-Git-Tag: v1.6.3.2~5^2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/6589ebf107214a9e6db31764e847301f1adebc81?ds=inline;hp=--cc http-push.c::remove_locks(): fix use after free Noticed and reported by Serhat Şevki Dinçer. Signed-off-by: Alex Riesen Acked-by: Clemens Buchacher Signed-off-by: Junio C Hamano --- 6589ebf107214a9e6db31764e847301f1adebc81 diff --git a/http-push.c b/http-push.c index 6805288857..0696da0fec 100644 --- a/http-push.c +++ b/http-push.c @@ -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; } }