Theory of resistive anomaly in a superconductor above a second-order critical magnetic field