When primary amines (aliphatic) react with HNO2, unstable diazonium salt is obtained which readily dissociate to give a carbocation, N2 and Cl−(the leaving group). The carbocation upon hydrolysis gives alcohol CH3CH2NH2HONOCH3CH2N+≡N−Cl→CH3C⊕H2H2OCH3CH2OH+H+