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 above code is considered as double free. Is the following considered as double free as well?
char *ptr;
char *ptr1;
ptr=malloc(5 * sizeof(*ptr));
ptr1=ptr;
free(ptr);
free(ptr1);
Thank you.