On a linearity theorem for measures