Normally, if a pointer is freed twice, it\'s a double free. For example,
char *ptr; ptr=malloc(5 * sizeof(*ptr)); free(ptr); free(ptr);
The
Yep. A double free is when you attempt to free a memory block that has already been freed. Both ptr and ptr1 are pointing to the same memory block, so the second call to free is attempting to free a memory block that is already freed.
free