Error analysis of waveform relaxation method for reaction-diffusion equations