<p>Thanks. Running now in our dev environment, no crash so far.<br>
I would attach a patch that works against the 4.3 branch, but Github won't allow me to attach .patch files (and no .txt neither, because I don't have write access to the repository).</p>

<p>So this is the plain text patch, that works for us:</p>

<pre><code>index 40e89d3..15c0fb3 100644
--- a/modules/dmq_usrloc/usrloc_sync.c
+++ b/modules/dmq_usrloc/usrloc_sync.c
@@ -197,14 +197,14 @@ void usrloc_get_all_ucontact(dmq_node_t* node)
         memcpy( &aorhash, cp, sizeof(aorhash));
         cp = (char*)cp + sizeof(aorhash);

+       r = 0;
+       ptr = 0;
         res = dmq_ul.get_urecord_by_ruid(_d, aorhash, &ruid, &r, &ptr);
-        aor = r->aor;
-        if (res > 0) {
-            LM_DBG("'%.*s' Not found in usrloc\n", aor.len, ZSW(aor.s));
-            dmq_ul.release_urecord(r);
-            dmq_ul.unlock_udomain(_d, &aor);
+       if (res < 0) {
+            LM_DBG("'%.*s' Not found in usrloc\n", ruid.len, ZSW(ruid.s));
             continue;
         }
+        aor = r->aor;
         LM_DBG("- AoR: %.*s  AoRhash=%d  Flags=%d\n", aor.len, aor.s, aorhash, flags);

         while (ptr) {
</code></pre>

<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/373#issuecomment-151447184">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZdU2Rw1peLXEm6_ukak6oUDBE4pXks5o_0o-gaJpZM4GSIu7.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/373#issuecomment-151447184"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>