Fixed #5923 (false positive: (error) Resource leak: fp (static file pointer))