data->n = malloc(sizeof(name*)*1); // am I mallocing correctly?
data->n[0]=malloc(sizeof(name));
you have only allocated space for 1 pointer data->n = malloc(sizeof(name*)*1);
therefore you have 1 pointer to a name struct.
i = readName(fp, &data->n[filep->ncards]);
but then you do the above, you can only do &data->n[0]
you cannot do &data->[1]
or higher subscripts. if you want more than 1 pointer to pointer to name, you must allocate space for the pointer and then make the pointer point to some valid memory.
try this
data->n = malloc((struct name*)how many pointers you want);
for(int i =0;i<how many pointers you want;i++)
data->n[i] = malloc(sizeof(struct name));
from you code since its not complete, I think ncards = how many pointers you want.
int readName(FILE *const fp, name **const names)
try
int readName(FILE *const fp, name ** names)
you wont be able to change data through a const** pointer, remove the const and try again