Fix the memory leak problem for mutex

Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
Signed-off-by: Tusa Viktor <tusa@balabit.hu>
Fix the memory leak problem when HAVE_ENVIRON is defined

Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
Signed-off-by: Tusa Viktor <tusavik@gmail.com>
rewrite-expr-grammar.ym: Free up token.

Reported-by: Xufeng Zhang <xufeng.zhang@windriver.com>
Signed-off-by: Viktor Tusa <tusavik@gmail.com>
template.c: Free entire template item list, not just the last item.

Reported-by: Xufeng Zhang <xufeng.zhang@windriver.com>
Signed-off-by: Viktor Tusa <tusavik@gmail.com>
Merge branch 'f/memory-leak-fixes' into 3.5/master

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>