From: Adam Dickmeiss Date: Sat, 18 Oct 2008 11:47:33 +0000 (+0200) Subject: Fixed bad memory ref in case of SRU diagnostics. X-Git-Tag: v3.0.38~23 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=9f9eecbb73b46c9cf31edc5d4a9a95e16cac3a3c;p=yaz-moved-to-github.git Fixed bad memory ref in case of SRU diagnostics. --- diff --git a/src/zoom-c.c b/src/zoom-c.c index 5acecb1..1a3cf7a 100644 --- a/src/zoom-c.c +++ b/src/zoom-c.c @@ -4044,13 +4044,13 @@ static zoom_ret handle_srw_response(ZOOM_connection c, if (*count < 0) *count = 0; - if (res->num_diagnostics > 0) - set_SRU_error(c, &res->diagnostics[0]); nmem = odr_extract_mem(c->odr_in); nmem_transfer(odr_getmem(resultset->odr), nmem); nmem_destroy(nmem); - if (*count > 0) + if (res->num_diagnostics > 0) + set_SRU_error(c, &res->diagnostics[0]); + else if (*count > 0) return ZOOM_connection_srw_send_search(c); return zoom_complete; }