[RTEMS Project] #2338: rtems/c/src/lib/libbsp/arm/nds/tools/ndstool/source/header.cpp:418: resource leak

RTEMS trac trac at rtems.org
Tue Apr 28 09:08:56 UTC 2015


#2338: rtems/c/src/lib/libbsp/arm/nds/tools/ndstool/source/header.cpp:418:
resource leak
---------------------+--------------------
 Reporter:  dcb      |      Owner:
     Type:  defect   |     Status:  new
 Priority:  low      |  Milestone:  4.11.1
Component:  General  |    Version:  4.10
 Severity:  minor    |   Keywords:
---------------------+--------------------
 [rtems/c/src/lib/libbsp/arm/nds/tools/ndstool/source/header.cpp:418]:
 (error) Resource leak: fRomList

 $ fgrep fRomList
 rtems/c/src/lib/libbsp/arm/nds/tools/ndstool/source/header.cpp
         FILE *fRomList = fopen(romlistfilename, "rt");
         if (!fRomList) { fprintf(stderr, "Cannot open file '%s'.\n",
 romlistfilename); exit(1); }
         while (fgets(s, 1024, fRomList))        // empty, title, title,
 title, title, filename, CRC32
 $

 Missing call to fclose.

--
Ticket URL: <http://devel.rtems.org/ticket/2338>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list