<p>In <a href="https://github.com/kamailio/kamailio/pull/390#discussion_r47195509">modules/rtpengine/rtpengine_hash.c</a>:</p>
<pre style='color:#555'>> +    LM_DBG("rtpengine_hash_table size = %d\n", hash_table_size);
> +
> +  // init hashtable
> +  rtpengine_hash_table = shm_malloc(sizeof(struct rtpengine_hash_table));
> +  if (!rtpengine_hash_table) {
> +          LM_ERR("no shm left to create rtpengine_hash_table\n");
> +          return 0;
> +  }
> +  memset(rtpengine_hash_table, 0, sizeof(struct rtpengine_hash_table));
> +  rtpengine_hash_table->size = hash_table_size;
> +
> +  // init hashtable row_entry_list
> +  rtpengine_hash_table->row_entry_list = shm_malloc(rtpengine_hash_table->size * sizeof(struct rtpengine_hash_entry*));
> +  if (!rtpengine_hash_table->row_entry_list) {
> +          LM_ERR("no shm left to create rtpengine_hash_table->row_entry_list\n");
> +          rtpengine_hash_table_destroy();
</pre>
<p>A minor nitpick: These calls to _destroy() here won't ever actually do anything, because the _sanity_checks() will always fail.</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/pull/390/files#r47195509">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZcUe7pa_kJO3MiNI6xnbDqEV668bks5pOR6XgaJpZM4GcraR.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/pull/390/files#r47195509"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>