RTEMS Tools | rtems-bin2c: Allow adding a license header (#4)

Joel Sherrill (@joel) gitlab at rtems.org
Wed Apr 2 18:44:47 UTC 2025




Joel Sherrill started a new discussion: https://gitlab.rtems.org/rtems/tools/rtems-tools/-/issues/4#note_122014


@hsd1807 Your MR to address this introduced a leak reported by Coverity Scan. Looks like it is a simple matter of adding a free. The commit message should mention the CID number and include "closes NNN" where the NNN is this issue number.

> \*\* CID 1639194:  Resource leaks  (RESOURCE_LEAK)\
> /misc/bin2c/rtems-bin2c.c: 346 in process()\
> \
> \
> \_____________________________\_<wbr>\_____________________________\_<wbr>\_____________________________\_<wbr>\_____________\_\
> \*\*\* CID 1639194:  Resource leaks  (RESOURCE_LEAK)\
> /misc/bin2c/rtems-bin2c.c: 346 in process()\
> 340       /\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*<wbr>\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*<wbr>\*\*\*\*\*\*\*/\
> 341     \
> 342       fclose(ifile);\
> 343       if ( createC ) { fclose(ocfile); }\
> 344       if ( createH ) { fclose(ohfile); }\
> 345       free(ifbasename_to_free);\
> \>\>\>     CID 1639194:  Resource leaks  (RESOURCE_LEAK)\
> \>\>\>     Variable "license_header" going out of scope leaks the storage it points to.\
> 346     }\
> 347     \
> 348     void usage(void)\
> 349     {\
> 350       fprintf(\
> 351          stderr,

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/tools/rtems-tools/-/issues/4#note_122014
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250402/c836331e/attachment.htm>


More information about the bugs mailing list