A heat exchanger (1) for gases, the heat exchanger (1) comprising a bundle of tubes (2) arranged inside a casing (3) defining a gas inlet (4) and a gas outlet (5), the tubes (2) being configured for the circulation of the gases with a view to exchanging heat with a coolant, and the tubes (2) being distributed in at least one column having a plurality of rows defining a plurality of spaces (8) between the rows, and comprising a coolant inlet pipe (9) and coolant outlet pipe (10) connected to the casing (3), and a bypass channel (11) incorporated into the casing (3) and connecting the spaces (8) defined between the rows of tubes (2) located facing the bypass channel (11) with one of the coolant outlet pipes (10) to improve the distribution of the coolant.