In line 794 of gif2apng.c is a memory leak for variable "delays" (don't forget to free the memory).
Also in line 882 is a memory leak for the variable "zbuf".
But I free them at the end?
You're right, because the "mistakes" are in the main function. If you return from there, the application gets closed and the memory freed. I didn't recognize, that everything is in the main function, where the issues don't lead into memory leaks ... my fault, sorry!