View Double Free Or Corruption (Fasttop) PNG

I think this is occurring because of using free in unload.

View Double Free Or Corruption (Fasttop) PNG. Glibc detected *** double free or corruption (fasttop): This can happen if it is using dynamic memory allocation or if it is calling free() in c directly somehow.

Android Virtual Device Manager Crashes With Double Free Or Corruption Stack Overflow
Android Virtual Device Manager Crashes With Double Free Or Corruption Stack Overflow from i.stack.imgur.com
I have gone through the code many times but i cant clealry see how i am misusing the free (temp2). Double free or corruption (out): I think this is occurring because of using free in unload.

Second monitor is repeatingly blank and activated again.

Program received signal sigabrt, aborted. I have gone through the code many times but i cant clealry see how i am misusing the free (temp2). Double free or corruption errors? Double free or corruption (fasttop):

View Double Free Or Corruption (Fasttop) PNG

Glibc detected *** double free or corruption (fasttop): The following section of my code gives me this messege when executing * glibc detected./a.out: Double free or corruption (fasttop): Double free or corruption (out): Double free or corruption on xubuntu 16.04. Find answers to double free or corruption from the expert community at experts exchange.