summaryrefslogtreecommitdiff
path: root/http-push.c
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2009-05-24 13:16:49 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-05-24 18:08:31 (GMT)
commit6589ebf107214a9e6db31764e847301f1adebc81 (patch)
tree2e1837dc34ceb0b15432d2821b3a3ef36b96455d /http-push.c
parentc98a95eea825ffe66ed690064c80733656506c66 (diff)
downloadgit-6589ebf107214a9e6db31764e847301f1adebc81.zip
git-6589ebf107214a9e6db31764e847301f1adebc81.tar.gz
git-6589ebf107214a9e6db31764e847301f1adebc81.tar.bz2
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>
Diffstat (limited to 'http-push.c')
-rw-r--r--http-push.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/http-push.c b/http-push.c
index 6805288..0696da0 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;
}
}