From: Adam Dickmeiss Date: Sat, 20 Dec 2003 22:42:53 +0000 (+0000) Subject: Fix leak in zquery2pquery X-Git-Tag: YAZPP.0.7.4.larry~26 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=9ec219ff60631d2545f8595d0ad51811007d962b;p=yazpp-moved-to-github.git Fix leak in zquery2pquery --- diff --git a/src/yaz-z-query.cpp b/src/yaz-z-query.cpp index 1f178cc..5e8ba84 100644 --- a/src/yaz-z-query.cpp +++ b/src/yaz-z-query.cpp @@ -2,7 +2,7 @@ * Copyright (c) 1998-2003, Index Data. * See the file LICENSE for details. * - * $Id: yaz-z-query.cpp,v 1.14 2003-12-16 14:17:01 adam Exp $ + * $Id: yaz-z-query.cpp,v 1.15 2003-12-20 22:42:53 adam Exp $ */ #include @@ -179,10 +179,9 @@ int Yaz_Z_Query::rpn2pquery(Z_RPNStructure *s, WRBUF buf) WRBUF Yaz_Z_Query::zquery2pquery(Z_Query *q) { - WRBUF buf = wrbuf_alloc(); - if (q->which != Z_Query_type_1 && q->which != Z_Query_type_101) return 0; + WRBUF buf = wrbuf_alloc(); if (q->u.type_1->attributeSetId) { /* Output attribute set ID */ wrbuf_puts(buf, "@attrset ");