From 6589ebf107214a9e6db31764e847301f1adebc81 Mon Sep 17 00:00:00 2001 From: Alex Riesen Date: Sun, 24 May 2009 15:16:49 +0200 Subject: http-push.c::remove_locks(): fix use after free MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Noticed and reported by Serhat Şevki Dinçer. Signed-off-by: Alex Riesen Acked-by: Clemens Buchacher Signed-off-by: Junio C Hamano --- http-push.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'http-push.c') 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; } } -- cgit v1.2.3