I'm relatively new to programing, but I think when you set two pointers equal, they point to the same memory location, and, when you change a value using a pointer, it changes the data at that location.
What you need is two seperate memory locations and then you need to copy each parameter into the other location.
Sorry if that didn't make any sense
Here's what I would do:
copy_stuff (Stuff* a, Stuff* b)
{
a->s = b->s;
a->a = b->a;
a->lck[0] = b->lck[0];
a->lck[1] = b->lck[1];
}
Stuff* M[2];
M[0] = malloc(sizeof(Stuff));
M[1] = malloc(sizeof(Stuff));
Stuff* Mplaceholder = NULL;
copy_stuff (Mplaceholder, M[0]);
copy_stuff (M[0], M[1]);
copy_stuff (M[1], Mplaceholder);
Hope this helps.