aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2009-05-24 15:16:49 +0200
committerJunio C Hamano <gitster@pobox.com>2009-05-24 11:08:31 -0700
commit6589ebf107214a9e6db31764e847301f1adebc81 (patch)
tree2e1837dc34ceb0b15432d2821b3a3ef36b96455d
parentc98a95eea825ffe66ed690064c80733656506c66 (diff)
downloadgit-6589ebf107214a9e6db31764e847301f1adebc81.tar.gz
git-6589ebf107214a9e6db31764e847301f1adebc81.tar.xz
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>
-rw-r--r--http-push.c3
1 files changed, 2 insertions, 1 deletions
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;
}
}