Fixed memory leak (setname in ZOOM_resultset)
authorAdam Dickmeiss <adam@indexdata.dk>
Sat, 18 Oct 2008 11:50:48 +0000 (13:50 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Sat, 18 Oct 2008 11:50:48 +0000 (13:50 +0200)
src/zoom-c.c

index 1a3cf7a..2c12c6a 100644 (file)
@@ -1480,7 +1480,8 @@ static zoom_ret ZOOM_connection_srw_send_search(ZOOM_connection c)
     {
     case ZOOM_TASK_SEARCH:
         resultset = c->tasks->u.search.resultset;
-        resultset->setname = xstrdup("default");
+        if (!resultset->setname)
+            resultset->setname = xstrdup("default");
         ZOOM_options_set(resultset->options, "setname", resultset->setname);
         start = &c->tasks->u.search.start;
         count = &c->tasks->u.search.count;