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.tokkee.org/?a=commitdiff_plain;h=6589ebf107214a9e6db31764e847301f1adebc81;p=git.git 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 --- diff --git a/http-push.c b/http-push.c index 680528885..0696da0fe 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; } }