Commit: Fix resource leaks reported by cppcheck

Nick Clifton nickc@redhat.com
Mon Oct 14 09:14:00 GMT 2013


Hi Guys,

  After running cppcheck:
  
    http://sourceforge.net/apps/mediawiki/cppcheck/index.php?title=Main_Page

  over the binutils sources I found a few more resource leaks.  So I am
  checking in the attached patch to fix them. 

Cheers
  Nick

bfd/ChangeLog
2013-10-14  Nick Clifton  <nickc@redhat.com>

	* gen-aout.c (main): Fix formatting.  Close file.

ld/ChangeLog
2013-10-14  Nick Clifton  <nickc@redhat.com>

	* emultempl/aix.em (_read_file): Close file at end of function.

gas/testsuite/ChangeLog
2013-10-14  Nick Clifton  <nickc@redhat.com>

	* gas/all/itbl-test.c (main): Close fas.

gas/ChangeLog
2013-10-14  Nick Clifton  <nickc@redhat.com>

	* read.c (add_include_dir): Use xrealloc.
	* config/tc-score.c (do_macro_bcmp): Initialise inst_main.
	* config/tc-tic6x.c (tic6x_parse_operand): Initialise second_reg.

binutils/ChangeLog
2013-10-14  Nick Clifton  <nickc@redhat.com>

	* readelf.c (decode_arm_unwind): Initialise addr structure.
	(process_symbol_table): Free lengths.
	* srcconv.c (wr_sc): Free info.

bfd/doc/ChangeLog
2013-10-14  Nick Clifton  <nickc@redhat.com>

	* chew.c (perform): Free next.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cppcheck.patch.bz2
Type: application/x-bzip2
Size: 2810 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20131014/1de3764e/attachment.bz2>


More information about the Binutils mailing list