Adding exit code check to contest_arrayfree