<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    I think the cleanup of the array with allocated values is not safe
    enough, if there is an error.<br>
    <br>
    I thought of this situation:<br>
    - acc went fine for several iterations and the allocated values are
    freed<br>
    - on current iteration it fails populating properly the values and
    the execution jumps to free the array. .s field can be a pointer
    from previous iteration<br>
    <br>
    I think that .s has to be made NULL after it is freed and checked to
    not be null before freeing it.<br>
    <br>
    Let me know if I overlooked something there.<br>
    <br>
    <div class="moz-cite-prefix">On 23/07/14 08:27, Lucian Balaceanu
      wrote:<br>
    </div>
    <blockquote cite="mid:53CF55C1.6060101@1and1.ro" type="cite">Hello,
      <br>
      <br>
      At 1&1 we have spotted an issue related to the cdr_extra
      parameters: for more than 10 string cdr_extra parameters, the
      addresses used by the new parameters overwrite the previous ones
      (this did not happen in 3.1, but is reproducible since at least
      3.3).
      <br>
      <br>
      I attached a patch that implements a solution where we allocate
      memory for the cdr extra params with pkg_malloc() and free it once
      it is no longer needed.
      <br>
      Daniel, if there is no comment related to this solution, I will
      commit the patch.
      <br>
      <br>
      Thank you,
      <br>
      Lucian Balaceanu
      <br>
      <br>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
sr-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
  </body>
</html>