Hanging program after trying to free allocated memory
<p>I'm not quite sure what is wrong with my current program and I have reach a bit of a road block:</p>

<pre><code>(*ptr).Name = (char*)malloc(strlen(record+1));
strcpy((*ptr).Name, record); 
free((*ptr).Name); //problem area
</code></pre>

<p>*ptr is a pointer that points to a structure that has various fields. After I copy some data into the Name field I want to free my allocated memory. When I step through my program I get no errors rather just a hanging program that will not continue after I try and free the memory. Any ideas? Thank you. </p>