Changeset: a198175f94c4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/a198175f94c4
Modified Files:
gdk/gdk_bat.c
Branch: persistent_sketches
Log Message:
Only free heaps that were actually allocated.
diffs (20 lines):
diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
--- a/gdk/gdk_bat.c
+++ b/gdk/gdk_bat.c
@@ -355,7 +355,6 @@ COLnew2(oid hseq, int tt, BUN cap, role_
if (bn->tvheap && width == 0 && ATOMheap(tt, bn->tvheap, cap) !=
GDK_SUCCEED) {
HEAPfree(bn->theap, true);
- HEAPfree(bn->tsketch, true);
goto bailout;
}
@@ -363,6 +362,8 @@ COLnew2(oid hseq, int tt, BUN cap, role_
assert(bn->tsketch);
if (HEAPalloc(bn->tsketch, SKETCH_SIZE, sizeof(uint8_t)) !=
GDK_SUCCEED) {
HEAPfree(bn->theap, true);
+ if (bn->tvheap)
+ HEAPfree(bn->tvheap, true);
goto bailout;
}
memset(bn->tsketch->base, 0, SKETCH_SIZE);
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]