[Devel] memory allocation question

Klaus Darilion klaus.mailinglists at pernau.at
Fri Nov 18 14:32:14 CET 2005


Hi!

Probably this is a newbee question.

I'm studying some source code and wonder about freeing allocated memory:
file modules/exec/exec.c

line 109: cmd_line=pkg_malloc(cmd_len);

this is freed in line 189:
	pkg_free(cmd_line);
but only if error01 happens.

Shouldn't this be freed in all cases?

regards
klaus



More information about the Devel mailing list