[prev in list] [next in list] [prev in thread] [next in thread]
List: monetdb-checkins
Subject: MonetDB: default - make_jaql_expand: fix leaks
From: Fabian Groffen <fabian () cwi ! nl>
Date: 2012-03-28 19:00:19
Message-ID: hg.ef46c4054f80.1332961219.6315528441665844383 () monetdb2 ! cwi-incubator ! nl
[Download RAW message or body]
Changeset: ef46c4054f80 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ef46c4054f80
Modified Files:
monetdb5/extras/jaql/jaql.c
Branch: default
Log Message:
make_jaql_expand: fix leaks
diffs (56 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
@@ -274,7 +274,7 @@ make_jaql_expand(tree *var, tree *expr)
if (expr->type == j_var && expr->next != NULL) {
/* JAQL's confusing "inner pipes" feature -- most probably to
- * steer Hadoop's map-reduce job generationi -- is just useless
+ * steer Hadoop's map-reduce job generation -- is just useless
* for us and actually making our life harder, so just pull out
* this inner pipe, and make it a proper top-level pipe instead */
res->next = expr->next;
@@ -316,6 +316,7 @@ make_jaql_group(tree *inputs, tree *tmpl
if (tmpl->type == j_error) {
freetree(inputs);
+ freetree(var);
return tmpl;
}
@@ -335,6 +336,7 @@ make_jaql_group(tree *inputs, tree *tmpl
"inputs must be equal");
freetree(inputs);
freetree(tmpl);
+ freetree(var);
return res;
}
if (strcmp(w->tval2->sval, var->sval) != 0) {
@@ -345,6 +347,7 @@ make_jaql_group(tree *inputs, tree *tmpl
res->sval = GDKstrdup(buf);
freetree(inputs);
freetree(tmpl);
+ freetree(var);
return res;
}
}
@@ -359,6 +362,7 @@ make_jaql_group(tree *inputs, tree *tmpl
"inputs must be unique (for use in 'into' expression)");
freetree(inputs);
freetree(tmpl);
+ freetree(var);
return res;
}
}
@@ -382,9 +386,11 @@ make_jaql_group(tree *inputs, tree *tmpl
if ((w = _check_exp_var1("group", var->sval, tmpl)) != NULL) {
freetree(inputs);
freetree(tmpl);
+ freetree(var);
return w;
}
}
+ freetree(var); /* no longer used after verification of input */
res->type = j_group;
res->tval1 = inputs;
_______________________________________________
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