Use refcounting for async shutdown

fix some memory leaks
This commit is contained in:
Wim Taymans 2017-01-12 14:57:07 +01:00
parent ee0aa6a2ac
commit 6d4db64767
21 changed files with 216 additions and 260 deletions

View file

@ -55,7 +55,11 @@ id_map_get_uri (SpaIDMap *map, uint32_t id)
IDMap *this = SPA_CONTAINER_OF (map, IDMap, map);
if (id == SPA_ID_INVALID)
return NULL;
return pinos_map_lookup (&this->uris, id);
if (SPA_LIKELY (pinos_map_check_id (&this->uris, id)))
return pinos_map_lookup_unchecked (&this->uris, id);
return NULL;
}
static IDMap default_id_map = {