r5646: state->loadfile might be NULL after allocation so this is really