Fix memory leaks in chew program.
authorNick Clifton <nickc@redhat.com>
Mon, 8 Aug 2016 11:19:29 +0000 (12:19 +0100)
committerNick Clifton <nickc@redhat.com>
Mon, 8 Aug 2016 11:19:29 +0000 (12:19 +0100)
commit8a286b63457628b0a55d395f14005f254512e27d
treeb4df89ac3d8750972156b1de2fa97e90c75e3e1c
parentdb9537d2b735300b129e2715012ae249ee015f58
Fix memory leaks in chew program.

* doc/chew.c (delete_string): Only free the string buffer if it is
there.  Mark the buffer as NULL after freeing.
(drop): Free the dropped string.
(free_words): New function: Frees the memory allocated to the
dictionary.
(add_instrinsic): Duplicate the name string, so that it can be
freed later on.
(compile): Free unused words.
(main): Free the dictionary and top level string buffers at the
end.
bfd/ChangeLog
bfd/doc/chew.c
This page took 0.024079 seconds and 4 git commands to generate.