Changeset: f553d4402a1f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/f553d4402a1f
Modified Files:
gdk/gdk_value.c
Branch: Dec2025
Log Message:
If ValRecord was allocated, we should free it. It can't be unallocated NIL.
diffs (27 lines):
diff --git a/gdk/gdk_value.c b/gdk/gdk_value.c
--- a/gdk/gdk_value.c
+++ b/gdk/gdk_value.c
@@ -139,18 +139,11 @@ VALget(ValPtr v)
void
VALclear(ValPtr v)
{
- if (v->allocated && !v->bat && ATOMextern(v->vtype)) {
- if (v->vtype == TYPE_str) {
- if (v->val.sval && v->val.sval != ATOMnilptr(v->vtype)) {
- GDKfree(v->val.sval);
- }
- } else {
- if (v->val.pval && v->val.pval != ATOMnilptr(v->vtype)) {
- GDKfree(v->val.pval);
- }
- }
- }
- VALempty(v);
+ if (v->allocated && !v->bat && ATOMextern(v->vtype)) {
+ assert(v->val.pval != ATOMnilptr(v->vtype));
+ GDKfree(v->val.pval);
+ }
+ VALempty(v);
}
/* Initialize V to an empty value (type void, value nil). See
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]