LaunchCode-Education-Archived / cs50x-live

The generic template version of Launchcode's CS50x curriculum. Fork this to create a repo for a particular city.
Creative Commons Zero v1.0 Universal
2 stars 5 forks source link

exercise: leaky #206

Closed stlou closed 8 years ago

stlou commented 8 years ago

A few things maybe to explain:

stlou commented 8 years ago

there's also one tricky part about this, which is that if you try to free(peep) before freeing the char* in peep (firstName and lastName), then you get errors of "invalid read".

I imagine most people will be confused by this and not understand why that is (I don't fully understand it, but I have an idea)