@matheusbsbs / matheus-bagliano / commits / 6589ebf107
Fork 0

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>

Alex Riesen committed May 24, 2009 at 15:16 UTC 6589ebf107214a9e6db31764e847301f1adebc81
1 file changed +2 -1
http-push.c
+2 -1
@@ -1356,8 +1356,9 @@ static void remove_locks(void)
1356
1357 fprintf(stderr, "Removing remote locks...\n");
1358 while (lock) {
1359 + struct remote_lock *next = lock->next;
1360 unlock_remote(lock);
1360 - lock = lock->next;
1361 + lock = next;
1362 }
1363 }
1364