When I allocate mem for a struct pointer then free it, should I be able to still access data inside it after the call to free()? How can I tell for sure that I'm free'ing it properly?
Here's a bit of code to illustrate what I'm talking about...
Code:typedef struct { int some_data; } LIST; function { LIST* item = NULL; item = malloc(sizeof(LIST)); item->some_data = 33; free(item); printf("some_data = %d \n", item->some_data); // should I still be able to access this after the free? }
Thanks for looking