[prev in list] [next in list] [prev in thread] [next in thread] 

List:       monetdb-checkins
Subject:    MonetDB: default - make_jaql_sort: fix leaks
From:       Fabian Groffen <fabian () cwi ! nl>
Date:       2012-03-28 19:00:20
Message-ID: hg.b2da982318b5.1332961220.6315528441665844383 () monetdb2 ! cwi-incubator ! nl
[Download RAW message or body]

Changeset: b2da982318b5 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b2da982318b5
Modified Files:
	monetdb5/extras/jaql/jaql.c
Branch: default
Log Message:

make_jaql_sort: fix leaks


diffs (16 lines):

diff --git a/monetdb5/extras/jaql/jaql.c b/monetdb5/extras/jaql/jaql.c
--- a/monetdb5/extras/jaql/jaql.c
+++ b/monetdb5/extras/jaql/jaql.c
@@ -579,8 +579,11 @@ make_jaql_sort(tree *var, tree *expr)
 	assert(var != NULL && var->type == j_var);
 	assert(expr != NULL && expr->type == j_sort_arg);
 
-	if ((res = _check_exp_var1("sort", var->sval, expr)) != NULL)
+	if ((res = _check_exp_var1("sort", var->sval, expr)) != NULL) {
+		freetree(var);
+		freetree(expr);
 		return res;
+	}
 
 	res = GDKzalloc(sizeof(tree));
 	res->type = j_sort;
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic