add_port_to_cache() uses 'cache_name' as the shash node name for
shash_add(). So, the del_cached_port() must also pass 'cache_name'
as argument for shash_find_and_delete().
This bug does not cause any issue currently but should be fixed.
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
char *cache_name = xasprintf("%s+%s", port->ps->name, port->port_cfg->name);
list_remove(&port->ports_node);
- shash_find_and_delete(&ctx->ports, port->port_cfg->name);
+ shash_find_and_delete(&ctx->ports, cache_name);
vteprec_physical_port_delete(port->port_cfg);
free(cache_name);
free(port);