Countries are implementing policies to develop greener energy markets worldwide. In Europe, the "2030 Energy and Climate Package" asks for further reductions of green house gases, renewable sources integration, and energy efficiency targets. But the polluting intensity of electricity may be different in average than when considering market inefficiencies, in particular losses, and therefore the implemented policy must take those differences into account. Precisely, herein we study the importance in terms of CO2 emissions the extra amount of energy necessary to cover losses. With this purpose we use Spanish market and system data with hourly frequency from 2011 to 2013. Our results show that indeed electricity losses significantly explain CO2 emissions, with a higher CO2 emissions rate when covering losses than the average rate of the system. Additionally, we find that the market closing technologies used to cover losses have a positive and significant impact on CO2 emissions: when polluting technologies (coal or combined cycle) close the market, the impact of losses on CO2 emissions is high compared to the rest of technologies (combined heat and power, renewables or hydropower). To the light of these results we make some policy recommendations to reduce the impact of losses on CO2 emissions.