Yes, and the mother of James and Joses and Salome is identified in Mark 15:40 s another Mary: “there were also women looking on afar off: among whom was Mary Magdalen, and Mary the mother of James the less and of Joseph, and Salome”. You are correct that the list of names differs from account to account, if that is your point.
The Mary of Mark 15:40 is the wife of Clopas, (a.k.a. Alphaeus) not Mary, wife of Joseph.