Re: [opensc-devel] memory leak in OpenCT/src/ifd/ifd-cyberjack.c

2008-12-19 Thread Alon Bar-Lev
Committed with some modification (single free). Please review. http://www.opensc-project.org/openct/changeset/1085 On 12/19/08, Ludovic Rousseau wrote: > Hello, > > The tool cppcheck [1] detected a memory leak in src/ifd/ifd-cyberjack.c > > Checking ./src/ifd/ifd-cyberjack.c... > [./src/ifd/i

Re: [opensc-devel] memory leak in OpenCT/src/ifd/ifd-cyberjack.c

2008-12-19 Thread Ludovic Rousseau
On Fri, Dec 19, 2008 at 9:46 PM, Alon Bar-Lev wrote: > Committed with some modification (single free). > Please review. I also prefer using one free() and some gotos. Bye -- Dr. Ludovic Rousseau ___ opensc-devel mailing list opensc-devel@lists.opens

[opensc-devel] memory leak in OpenCT/src/ifd/ifd-cyberjack.c

2008-12-19 Thread Ludovic Rousseau
Hello, The tool cppcheck [1] detected a memory leak in src/ifd/ifd-cyberjack.c Checking ./src/ifd/ifd-cyberjack.c... [./src/ifd/ifd-cyberjack.c:390]: Memory leak: state Defines='' The state variable is allocated but not freed in case of error. I propose the attached patch. I am not sure it i