On matsumura is proved the following proposition:
let $(R,m)$ be a local ring and $M$ a flat $R$-module. If $x_1,\ldots,x_n\in M$ are such that their images $\bar{x}_1,\ldots,\bar{x}_n$ in $\bar{M}=M/mM$ are linearly independet over $R/m$ then $x_1,\ldots,x_n$ are linearly independent over $R$.
Then it says if $M$ is finitely generated then this implies $M$ free, and I see this. But It also says if $m$ is nilpotent then $M$ is free, I don't see this, could you explain it to me, please?