if (entry) {
/* Remove from cache */
- if (entry->id)
- if (!silc_idcache_del_by_id(id_list->servers, (void *)entry->id))
- return FALSE;
+ if (!silc_idcache_del_by_context(id_list->servers, entry))
+ return FALSE;
/* Free data */
silc_free(entry->server_name);
silc_free(entry->id);
+ silc_free(entry->server_info);
memset(entry, 'F', sizeof(*entry));
silc_free(entry);
if (entry) {
/* Remove from cache */
- if (entry->id)
- if (!silc_idcache_del_by_context(id_list->clients, entry))
- return FALSE;
+ if (!silc_idcache_del_by_context(id_list->clients, entry))
+ return FALSE;
/* Free data */
silc_free(entry->nickname);
+ silc_free(entry->servername);
silc_free(entry->username);
silc_free(entry->userinfo);
silc_free(entry->id);
if (entry) {
/* Remove from cache */
- if (entry->id)
- if (!silc_idcache_del_by_id(id_list->channels, (void *)entry->id))
- return FALSE;
+ if (!silc_idcache_del_by_context(id_list->channels, entry))
+ return FALSE;
/* Free all client entrys from the users list. The silc_hash_table_free
will free all the entries so they are not freed at the foreach