//-------------------------------------------------------------------------
 // icmp foo
 //-------------------------------------------------------------------------
-static const ip::snort_in6_addr fixed_addr = {0xFF,0,0,0};
+
+static const ip::snort_in6_addr fixed_addr = { { { 0xFF, 0, 0, 0 } } };
+
 inline void FlowKey::update_icmp4(const SfIp*& srcIP, uint16_t& srcPort,
     const SfIp*& dstIP, uint16_t& dstPort)
 {
 
     {
         entry = new AppInfoTableEntry(next_custom_appid++, snort_strdup(app_name));
         custom_app_info_table[entry->appId] = entry;
-        add_entry_to_app_info_name_table(entry->app_name_key, entry);
+
+        if ( !add_entry_to_app_info_name_table(entry->app_name_key, entry) )
+        {
+            delete entry;
+            return nullptr;
+        }
     }
 
     return entry;
         if ((app_id = get_static_app_info_entry(entry->payloadId)))
             app_info_payload_table[app_id] = entry;
 
-        add_entry_to_app_info_name_table(entry->app_name_key, entry);
+        if ( !add_entry_to_app_info_name_table(entry->app_name_key, entry) )
+            delete entry;
     }
     fclose(tableFile);
 
 
     {
         // get message if one is available.
         ConnectorMsgHandle* handle = connector_receive->receive_message(false);
+
         // if none, we are complete
-        if ( handle == nullptr )
+        if ( !handle )
             break;
-        else
+
+        else if ( receive_handler )
         {
             SCMessage* msg = new SCMessage;
+
             // get the ConnectorMsg from the (at this point) abstract class
             ConnectorMsg* connector_msg = connector_receive->get_connector_msg(handle);
 
             msg->content = connector_msg->data;
             msg->content_length = connector_msg->length;
+
             // if the message is longer than the header, assume we have a header
             if ( connector_msg->length >= sizeof(SCMsgHdr) )
             {
             }
 
             msg->handle = handle;   // link back to the underlying SCC message
-
             received_message = true;
 
-            if ( receive_handler != nullptr )
-                (receive_handler)(msg);
-
-            if ( (max_messages > 0) && (--max_messages == 0) )
-                break;
+            receive_handler(msg);
         }
+
+        if ( (max_messages > 0) && (--max_messages == 0) )
+            break;
     }
     return received_message;
 }