static void ldb_kv_timeout(struct tevent_context *ev,
			   struct tevent_timer *te,
			   struct timeval t,
			   void *private_data)
{
	struct ldb_kv_context *ctx;
	ctx = talloc_get_type(private_data, struct ldb_kv_context);

	if (!ctx->request_terminated) {
		/* request is done now */
		ldb_kv_request_done(ctx, LDB_ERR_TIME_LIMIT_EXCEEDED);
	}

	if (ctx->spy) {
		/* neutralize the spy */
		ctx->spy->ctx = NULL;
		ctx->spy = NULL;
	}
	talloc_free(ctx);
}
static void ldb_kv_timeout(struct tevent_context *ev,
			   struct tevent_timer *te,
			   struct timeval t,
			   void *private_data)
{
	struct ldb_kv_context *ctx;
	ctx = talloc_get_type(private_data, struct ldb_kv_context);

	if (!ctx->request_terminated) {
		 
		ldb_kv_request_done(ctx, LDB_ERR_TIME_LIMIT_EXCEEDED);
	}

	if (ctx->spy) {
		 
		ctx->spy->ctx = NULL;
		ctx->spy = NULL;
	}
	talloc_free(ctx);
}