From a80f9aa49227801ad66b4b019c23987ad1adf224 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 7 Feb 2015 11:49:14 +1100 Subject: [PATCH] Don't miss dropping stratifier clients whose dropped flag is set when no reference count is held --- src/stratifier.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index 9d64f774..c0fad849 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1534,13 +1534,13 @@ static void drop_client(ckpool_t *ckp, sdata_t *sdata, const int64_t id) client = __instance_by_id(sdata, id); /* Upgrade to write lock */ ck_ulock(&sdata->instance_lock); - if (client && !client->dropped) { - user = client->user_instance; + if (client) { /* If the client is still holding a reference, don't drop them * now but wait till the reference is dropped */ - if (!client->ref) + if (!client->ref) { + user = client->user_instance; dropped = __drop_client(sdata, client, user); - else + } else client->dropped = true; }