~emersion/mrsh

83bb670237abcc2f2a9eefd67ae5daf46b244bcf — emersion 1 year, 8 months ago 76b14ce
builtin: fix memory leaks in dot and eval
2 files changed, 2 insertions(+), 0 deletions(-)

M builtin/dot.c
M builtin/eval.c
M builtin/dot.c => builtin/dot.c +1 -0
@@ 53,6 53,7 @@ int builtin_dot(struct mrsh_state *state, int argc, char *argv[]) {
		ret = mrsh_run_program(state, program);
	}

	mrsh_program_destroy(program);
	mrsh_parser_destroy(parser);
	close(fd);
	return ret;

M builtin/eval.c => builtin/eval.c +1 -0
@@ 46,6 46,7 @@ int builtin_eval(struct mrsh_state *state, int argc, char *argv[]) {
		ret = mrsh_run_program(state, program);
	}

	mrsh_program_destroy(program);
	mrsh_parser_destroy(parser);
	mrsh_buffer_finish(&buf);
	return ret;