  This work revisits the notions of connection and curvature in generalized
geometry, with emphasis on torsion-free generalized connections on a transitive
Courant algebroid, compatible with a generalized metric. Non-exact Courant
algebroids have been considered recently by R. Rubio in the context of
$B_n$-generalised geometry and arise naturally from the theory of generalized
reduction of Burzstyn, Cavalcanti and Gualtieri. As an application, we provide
a mathematical derivation of the equations of motion of heterotic supergravity,
inspired by the work of Coimbra, Strickland-Constable and Waldram.
