# Localization of a maximal Cohen-Macaulay module

Let $(R,m)$ be a Cohen-Macaulay local ring of dimension $d\geq 2$ and $M$ an module with depth$M=d.$

Is there any example of $M$ such that

$(1)$ $M_p$ is not free for some $p\in Ass(R)$ and

$(2)$ $S^{-1}M$ is nonzero and not free where $S$ is the set of all nonzero divisors.

Let $R$ be $k[x,z_1,,z_2,\dots,z_d]_{\langle x,z_1,z_2,\dots,z_d\rangle}/\langle x^2 \rangle$. This is a local Noetherian ring of dimension $d$ that is a Cohen-Macaulay ring, even a local complete intersection ring. Let $M$ be $R/\langle x \rangle$. The sequence $(z_1,z_2,\dots,z_d)$ is an $M$-regular sequence. Thus $M$ has depth $d$, i.e., $M$ is a (maximal) Cohen-Macaulay module.
The unique associated prime of $R$ is $\mathfrak{p}=\langle x \rangle$. Thus, this also equals the set of all nonzero divisors. So $S^{-1}R$ equals the local ring $R_{\mathfrak{p}}$. The local ring $R_\mathfrak{p}$ is $K[x]/\langle x^2 \rangle$, where $K$ equals $k(z_1,\dots,z_d)$. The $R_{\mathfrak{p}}$-module $M_{\mathfrak{p}}$ is $R_{\mathfrak{p}}/\langle x \rangle$. This is not a free $R_{\mathfrak{p}}$-module.