From 226063abdf1fadf1850eb6a7a19cc71a9bb1c8bf Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 29 Oct 2013 13:25:18 +0100 Subject: [PATCH] yaz-client: fix setting of SRU record schema If scheme was unset, it could lead to invalid memory reference. --- client/client.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/client/client.c b/client/client.c index 8043be1..b404ae2 100644 --- a/client/client.c +++ b/client/client.c @@ -1524,8 +1524,7 @@ static int send_SRW_searchRequest(const char *arg) sru_maximumRecords = 0; sr->u.request->maximumRecords = odr_intdup(out, 0); sr->u.request->facetList = facet_list; - if (record_schema) - sr->u.request->recordSchema = record_schema; + sr->u.request->recordSchema = record_schema; if (recordsyntax_size == 1 && !yaz_matchstr(recordsyntax_list[0], "xml")) sr->u.request->recordPacking = "xml"; return send_srw(sr); @@ -3185,8 +3184,7 @@ static int send_SRW_presentRequest(const char *arg) sr->u.request->startRecord = odr_intdup(out, setno); sru_maximumRecords = nos; sr->u.request->maximumRecords = odr_intdup(out, nos); - if (record_schema) - sr->u.request->recordSchema = record_schema; + sr->u.request->recordSchema = record_schema; if (recordsyntax_size == 1 && !yaz_matchstr(recordsyntax_list[0], "xml")) sr->u.request->recordPacking = "xml"; return send_srw(sr); -- 1.7.10.4