You need to init s_ga_s to NULL, otherwise, there can be problem in the check for the second fail.