Sure, you could blame Windows, or reallocate your memory to something bigger than a pointer...

Code:
 temp = realloc(rec, sizeof(struct records *));
... 
temp = realloc(rec, sizeof(*temp));