From 80591d54d0cacef32e5d5d76303338bf4043f6b9 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 17 Jun 2010 16:10:41 +0200 Subject: [PATCH] client_destroy destroys ZOOM_resultset (bug #3489). ZOOM_resultset_destroy is now called in client_destroy. In earlier 1.4-releases of Pazpar2 it was called in client_set_connection. It migth be good idea to add a ZOOM call to disassociate a ZOOM_resultset from a ZOOM_connection to ensure no referral to a ZOOM_connection in use by a different client (session). --- src/client.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/client.c b/src/client.c index 064754a..318f645 100644 --- a/src/client.c +++ b/src/client.c @@ -655,8 +655,11 @@ int client_destroy(struct client *c) xfree(c->cqlquery); c->cqlquery = 0; assert(!c->connection); - assert(!c->resultset); - + + if (c->resultset) + { + ZOOM_resultset_destroy(c->resultset); + } yaz_mutex_destroy(&c->mutex); xfree(c); client_use(-1); @@ -668,11 +671,6 @@ int client_destroy(struct client *c) void client_set_connection(struct client *cl, struct connection *con) { - if (cl->resultset) - { - ZOOM_resultset_destroy(cl->resultset); - cl->resultset = 0; - } if (con) { assert(cl->connection == 0); -- 1.7.10.4