<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p>did you change the C code of sanity module?</p>
<p>The parsed field for From header should be populated by
corresponding functions from core parser, if you overwrite it,
then you leak what was there before. From header is among the ones
parsed first, so likely it is already parsed as it gets to sanity
module.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<br>
<div class="moz-cite-prefix">On 01.06.18 14:07, Konstantin Polyakov
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:1527854855.894469230@f311.i.mail.ru">
Hi Daniel,<br>
<br>
Thank you for answer. We have pkg memory leak in 4.4.7 and I found
that place in the sanity module during check of From header.<br>
That sip_msg comes from outside and we assign value to parsed
member. <br>
So I expect it should be correct.<br>
<br>
Best regards <br>
Konstantin<br>
<br>
<blockquote style="border-left:1px solid #0857A6; margin:10px;
padding:0 0 0 10px;"> Пятница, 1 июня 2018, 13:31 +03:00 от
Daniel-Constantin Mierla <a class="moz-txt-link-rfc2396E" href="mailto:miconda@gmail.com"><miconda@gmail.com></a>:<br>
<br>
<div id="">
<div class="js-helper js-readmsg-msg">
<style type="text/css"></style>
<div> <base target="_self" href="https://e.mail.ru/">
<div id="style_15278490770000000090_BODY">
<div class="class_1527860613">
<div
class="moz-cite-prefix_mailru_css_attribute_postfix">Hello,<br>
<br>
is this a new header or assigning to an existing
header structure?<br>
<br>
The existing headers are cleaned up inside
clean_hdr_field().<br>
<br>
Cheers,<br>
Daniel<br>
<br>
On 31.05.18 11:54, Konstantin Polyakov wrote:<br>
</div>
<blockquote type="cite"
cite="mid:1527760482.120883825@f45.i.mail.ru"> Hello
All,<br>
<br>
There is a structure <strong>sip_msg</strong> which
is passed into a module and represents a received
sip message.<br>
It contains number of pointers to <strong>hdr_field</strong> members.<br>
In its turn <strong>hdr_field</strong> contains
member <strong>void* parsed</strong><br>
<br>
In the sanity module we assign to <strong>parsed</strong> member
a pointer to newly allocated memory and we don't
free that memory at the end.<br>
Do we need to free explicitly or this memory will be
deallocated later together with <strong>sip_msg</strong>?<br>
<br>
In other words is it memory leak or not?<br>
<br>
<br>
Best regards,<br>
Konstantin<br>
<br>
<br>
<br>
<fieldset
class="mimeAttachmentHeader_mailru_css_attribute_postfix"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kamailio (SER) - Development Mailing List
<a class="moz-txt-link-abbreviated_mailru_css_attribute_postfix" href="//e.mail.ru/compose/?mailto=mailto%3asr%2ddev@lists.kamailio.org" target="_blank" rel=" noopener noreferrer" moz-do-not-send="true">sr-dev@lists.kamailio.org</a>
<a class="moz-txt-link-freetext_mailru_css_attribute_postfix" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank" rel=" noopener noreferrer" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
</blockquote>
<p><br>
</p>
<pre class="moz-signature_mailru_css_attribute_postfix" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated_mailru_css_attribute_postfix" href="http://www.asipto.com" target="_blank" rel=" noopener noreferrer" moz-do-not-send="true">www.asipto.com</a>
<a class="moz-txt-link-abbreviated_mailru_css_attribute_postfix" href="http://www.twitter.com/miconda" target="_blank" rel=" noopener noreferrer" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated_mailru_css_attribute_postfix" href="http://www.linkedin.com/in/miconda" target="_blank" rel=" noopener noreferrer" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Kamailio World Conference -- <a class="moz-txt-link-abbreviated_mailru_css_attribute_postfix" href="http://www.kamailioworld.com" target="_blank" rel=" noopener noreferrer" moz-do-not-send="true">www.kamailioworld.com</a></pre>
</div>
</div>
<base target="_self" href="https://e.mail.ru/"> </div>
</div>
</div>
</blockquote>
<br>
<br>
С уважением,<br>
Константин Поляков.<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio World Conference -- <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
</body>
</html>