What is the safest way to fix a curtain rail?
Your best solution would be to take the curtain rail down completely and re fix it.

Fill in the existing holes and repaint the wall if necessary then put it back up as if it were new.

You'll need to avoid the existing holes and some of the answers to this question may be of use.