pool_t pool;
struct auth_worker_connection *conn;
bool next;
+ bool destroyed;
};
static bool user_callback(const char *reply, void *context)
if (strcmp(reply, "OK") != 0)
ctx->ctx.failed = TRUE;
- ctx->ctx.callback(NULL, ctx->ctx.context);
+ if (!ctx->destroyed)
+ ctx->ctx.callback(NULL, ctx->ctx.context);
pool_unref(&pool);
return TRUE;
}
int ret = ctx->ctx.failed ? -1 : 0;
*_ctx = NULL;
+
+ ctx->destroyed = TRUE;
pool_unref(&ctx->pool);
return ret;
}