From: Adam Dickmeiss Date: Thu, 17 Jun 2010 14:10:41 +0000 (+0200) Subject: client_destroy destroys ZOOM_resultset (bug #3489). X-Git-Tag: v1.4.2~5 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=80591d54d0cacef32e5d5d76303338bf4043f6b9;p=pazpar2-moved-to-github.git 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). --- 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);