mobile: Fix memory leak when not using a LUA script