diff options
author | Nick Clifton <nickc@redhat.com> | 2016-08-08 12:19:29 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2016-08-08 12:19:29 +0100 |
commit | 8a286b63457628b0a55d395f14005f254512e27d (patch) | |
tree | b4df89ac3d8750972156b1de2fa97e90c75e3e1c /gdb/amd64-nat.c | |
parent | db9537d2b735300b129e2715012ae249ee015f58 (diff) | |
download | gdb-8a286b63457628b0a55d395f14005f254512e27d.zip gdb-8a286b63457628b0a55d395f14005f254512e27d.tar.gz gdb-8a286b63457628b0a55d395f14005f254512e27d.tar.bz2 |
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.
Diffstat (limited to 'gdb/amd64-nat.c')
0 files changed, 0 insertions, 0 deletions