<p>Hello Daniel,</p>

<p>After your commit:</p>

<pre><code>commit 56cd7a0d38c8bbee6cc3e981b7a2b78b6d47257d
Author: Daniel-Constantin Mierla <****@****>
Date:   Thu Oct 22 23:08:44 2015 +0200

    db_postgres: don't free pg query structure in store result function

    - it is done when freeing the result

diff --git a/modules/db_postgres/km_dbase.c b/modules/db_postgres/km_dbase.c
index 50ffd7f..816a512 100644
--- a/modules/db_postgres/km_dbase.c
+++ b/modules/db_postgres/km_dbase.c
@@ -602,7 +602,6 @@ int db_postgres_store_result(const db1_con_t* _con, db1_res_t** _r)
        }

 done:
-       db_postgres_free_query(_con);
        return (rc);
 }
</code></pre>

<p>Kamailio doesn't crash anymore in my testing scenario.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/issues/377#issuecomment-150552222">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZWF0KUVnbcpsP0gnvtSsvbgegH7Gks5o-hcWgaJpZM4GTvID.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/377#issuecomment-150552222"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>