Menu

#2 Memory leaks in source code file gif2apng.c

open
nobody
None
5
2013-01-23
2013-01-23
DonChunior
No

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".

Discussion

  • Max Stepin

    Max Stepin - 2013-01-24

    But I free them at the end?

    line 1215:

    free(zbuf);

    line 1238:

    free(delays);

     
  • DonChunior

    DonChunior - 2013-01-24

    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!