Merge branch 'maint-1.6.1' into maint-1.6.2
[gitweb.git] / http-push.c
index 30d2d340418f7f40b77823b1b58b307985347bdf..f101df40861a13db40cb2f564476369f3765a28f 100644 (file)
@@ -748,7 +748,6 @@ static void finish_request(struct transfer_request *request)
                        aborted = 1;
                }
        } else if (request->state == RUN_FETCH_LOOSE) {
-               fchmod(request->local_fileno, 0444);
                close(request->local_fileno); request->local_fileno = -1;
 
                if (request->curl_result != CURLE_OK &&
@@ -1379,8 +1378,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;
        }
 }