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

@ -42,8 +42,16 @@ check_global_owner (PinosCore *core,
PinosGlobal *global;
global = pinos_map_lookup (&core->objects, id);
if (global == NULL)
return false;
return (global && global->owner == client);
if (global->owner == NULL)
return true;
if (global->owner->ucred.uid == client->ucred.uid)
return true;
return false;
}
static void