<p>It is baffling how free(data) works, yet free(lengths) fails, since they were allocated in the same way and place. Moreover, I've found even more problems with the module (e.g. memory corruption at res.c +185).</p>

<p>I will do a complete code audit and return with a fully tested patch (somewhere around tomorrow).</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/issues/270#issuecomment-49190300">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/5479561__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyMTE0NjgzNSwiZGF0YSI6eyJpZCI6MzcxNDUxODl9fQ==--163044c1ece4fe15ab0b0efdd7bc07b910cd4223.gif" width="1" /></p>