
The thermally rearranged oligomers prepared by the reaction of an .alpha.,.beta.-ethylenically unsaturated aldehyde with organic amines are thermally rearranged to give a more thermally stable product with labile amino hydrogens available for further reaction, after reaction with a carboxylic acid, organic halide or an epoxide containing compound are employed as corrosion inhibitors in a process for preventing corrosion of ferrous metals in contact with corrosive brine, oil and gas well fluids.











