Just like pzaenger said...
ptr = calloc/malloc/realloc(parameters);
if(ptr == NULL)
{
printf("Well shucks...");
}
Simple enough.
I've been building on some code and I too have a lot of parameters to it 7/8 at the moment, with most of them being pointers that are dereferenced and so on.
I have a few functions, with more on the way, that use these same 7/8 parameters. So to clean them up, I am simply going to stuff them into a structure(c struct). That way, all I have to do is pass a single parameter, the struct(or more than likely a ptr to the struct).
All you have to do now at the beginning, is malloc/calloc memory for the struct, then malloc/calloc memory for any pointers inside the struct.
Then you pass that struct to and fro, doing whatever it is you need to do.
In the end, you go through the struct and free up any memory malloc/calloc'ed inside of it. Then free up the memory(if a ptr to the struct was used) for the struct itself.