Mallocs and frees need to be paired up.
malloc grabbed a chunk of memory big enough for Person.
When you free you tell malloc the piece of memory starting "here" is no longer needed, it knows how much it allocated and frees it.
Whether you call
free(testPerson)
or
free(testPerson->firstName)
all that free() actually receives is an address, the same address, it can't tell which you called. Your code is much clearer if you use free(testPerson) though - it clearly matches up the with malloc.