If dnsproxy is not in use, like when connman has been started
with -r option, then the listener_table will be NULL which can
cause crash in hash table lookup call.
if (index < 0)
return -EINVAL;
+ if (listener_table == NULL)
+ return 0;
+
if (g_hash_table_lookup(listener_table, GINT_TO_POINTER(index)) != NULL)
return 0;
DBG("index %d", index);
+ if (listener_table == NULL)
+ return;
+
ifdata = g_hash_table_lookup(listener_table, GINT_TO_POINTER(index));
if (ifdata == NULL)
return;