From 9ad7a007903707f49428bac36a96f56262d2ec44 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Sat, 11 Jan 2003 03:18:53 +0000 Subject: [PATCH] Fixed two memory leaks --- cql/cql.y | 4 ++-- cql/cqltransform.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cql/cql.y b/cql/cql.y index 4a816aa..0bcc9cb 100644 --- a/cql/cql.y +++ b/cql/cql.y @@ -1,4 +1,4 @@ -/* $Id: cql.y,v 1.1 2003-01-06 08:20:27 adam Exp $ +/* $Id: cql.y,v 1.2 2003-01-11 03:18:53 adam Exp $ Copyright (C) 2002-2003 Index Data Aps @@ -98,7 +98,7 @@ searchClause: $$.rel->u.st.index = strdup($1.buf); } searchClause { $$.cql = $4.cql; - cql_node_destroy($$.rel); + cql_node_destroy($2.rel); } | '>' searchTerm '=' searchTerm { $$.rel = $0.rel; diff --git a/cql/cqltransform.c b/cql/cqltransform.c index d5e3ddb..7bbfc9f 100644 --- a/cql/cqltransform.c +++ b/cql/cqltransform.c @@ -1,4 +1,4 @@ -/* $Id: cqltransform.c,v 1.1 2003-01-06 08:20:27 adam Exp $ +/* $Id: cqltransform.c,v 1.2 2003-01-11 03:18:53 adam Exp $ Copyright (C) 2002-2003 Index Data Aps @@ -431,6 +431,7 @@ int cql_transform(cql_transform_t ct, } } cql_transform_r (ct, cn, pr, client_data, prefix_ar, 1); + cql_node_destroy(prefix_ar[0]); return ct->error; } -- 1.7.10.4