Greetings,
In domain module, command is_domain_local - using parameter_fixup where there is a call pkg_malloc, but nowhere function free_fixup is used. This will be memory leak, or I'm missing something.
Thanks for the prompt reply, Toly
toly writes:
In domain module, command is_domain_local - using parameter_fixup where there is a call pkg_malloc, but nowhere function free_fixup is used. This will be memory leak, or I'm missing something.
for completeness, memory for the parameter should indeed be freed when openser terminates. this is handled automatically by fixup_free_pvar_null function in kamaili 1.4. it is not a big deal to not free the memory at termination, because it is needed until that point.
-- juha
On 10/07/08 21:17, Juha Heinanen wrote:
toly writes:
In domain module, command is_domain_local - using parameter_fixup where there is a call pkg_malloc, but nowhere function free_fixup is used. This will be memory leak, or I'm missing something.
for completeness, memory for the parameter should indeed be freed when openser terminates.
You are right, just that the call of fixup_free_* functions is not included it. A clean shut down would help a lot to detect memleaks. I introduced the fixup_free_* functions to be available for modules such as perl that want to use functions exported by other modules dynamically, at run time (create/free the parameters on the fly) -- not sure the perl module is using it yet.
this is handled automatically by fixup_free_pvar_null function in kamaili 1.4. it is not a big deal to not free the memory at termination, because it is needed until that point.
However, to clarify, this issue is harmless, fixup functions are called only once, at startup, and entire memory used by kamailio/openser is freed at shut down. As Juha said, during runtime that variable is needed.
Cheers, Daniel
Thanks guys for clarification.
Toly
toly wrote:
Greetings,
In domain module, command is_domain_local - using parameter_fixup where there is a call pkg_malloc, but nowhere function free_fixup is used. This will be memory leak, or I'm missing something.
Thanks for the prompt reply, Toly