As you specifically mention Spain, this answer is about the usage in Spain.
To refer to a small corridor inside a building, such as in a house or in an office building, the word "pasillo" is much more commonly used.
The word "corredor" is sometimes used to refer to much larger corridors, either indoors (maybe at an airport) or most commonly outdoors. For example, the corridors around a courtyard might be called "corredores". There are also several figurative uses of this meaning of the word "corredor", such as the names of some large geographical entities with a similar shape (Corredor del Henares, or several other examples here under "Territorio") or even "corredor de la muerte", which means "death row" .