Integrated circuit type magnetic memory with error correction