Magnetic flux leakage (MFL) inspection is a common method for detecting inner corrosions of oil-gas pipelines; the Hall Effect element is the core sensor of MFL inspections. The Hall sensor is sensitive to temperature, so environmental changes will lead to output error of Hall sensors. In order to compensate for temperature errors of Hall sensors, a segment of oil-gas pipeline with diameter 6 inch was taken as a research object. A fusion model including 50 Hall sensors and 1 temperature sensor was built up, and a functional link artificial neural network optimized by the artificial immune algorithm was used to fuse the output data of the multiple sensors. The lab research results show that the artificial immune algorithm can improve training speed and precision of the functional link neural network; the model built up can compensate effectively for temperature errors of Hall sensors and under the conditions of changing temperature, the precision of magnetic flux inspections of pipelines to detect corrosions can be improved significantly.