We study the time evolution of the local magnetization in the critical Ising chain in a transverse field after a sudden change of the parameters at a defect. The relaxation of the defect magnetization is algebraic and the corresponding exponent, which is a continuous function of the defect parameters, is calculated exactly. In finite chains the relaxation is oscillating in time and its form is conjectured on the basis of precise numerical calculations.