Merge git://git.bogomips.org/git-svn
[gitweb.git] / http-push.c
index dac2c6e0524e3051ca98bfb4d75fbc81efe91eef..45e8a69e2d6b83f5a1564e7d1fe40d783d87ae3e 100644 (file)
@@ -1415,8 +1415,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;
        }
 }