Changeset: 2cd33b22c6ec for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/2cd33b22c6ec
Modified Files:
monetdb5/mal/mal_instruction.c
Branch: default
Log Message:
Clean before returning
diffs (21 lines):
diff --git a/monetdb5/mal/mal_instruction.c b/monetdb5/mal/mal_instruction.c
--- a/monetdb5/mal/mal_instruction.c
+++ b/monetdb5/mal/mal_instruction.c
@@ -1134,6 +1134,7 @@ defConstant(MalBlkPtr mb, int type, ValP
cst->val.bval = bat_nil;
} else {
mb->errors = createMalException(mb, 0, TYPE, "BAT
coercion error");
+ VALclear(cst); // it could contain allocated space
return -1;
}
} else if (cst->vtype != type && !isPolyType(type)) {
@@ -1159,8 +1160,7 @@ defConstant(MalBlkPtr mb, int type, ValP
k = fndConstant(mb, cst, MAL_VAR_WINDOW);
if (k >= 0) {
/* protect against leaks coming from constant reuse */
- if (ATOMextern(type) && cst->val.pval)
- VALclear(cst);
+ VALclear(cst);
return k;
}
k = newTmpVariable(mb, type);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list