Skip to content
Commit 8a286b63 authored by Nick Clifton's avatar Nick Clifton
Browse files

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.
parent db9537d2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment