Code

Merge branch 'maint-1.6.0' into maint-1.6.1
authorJunio C Hamano <gitster@pobox.com>
Sun, 24 May 2009 22:29:13 +0000 (15:29 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 24 May 2009 22:29:13 +0000 (15:29 -0700)
* maint-1.6.0:
  http-push.c::remove_locks(): fix use after free

http-push.c

index cb5bf95a736c571259aef51884cc20e4169bf707..f743c9796a369a44c84238c244314da3c7b45dab 100644 (file)
@@ -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;
        }
 }