Changeset: d06dbfd4c22e for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/d06dbfd4c22e Modified Files: sql/backends/monet5/for.c Branch: default Log Message:
Throw errors and added missing free calls diffs (32 lines): diff --git a/sql/backends/monet5/for.c b/sql/backends/monet5/for.c --- a/sql/backends/monet5/for.c +++ b/sql/backends/monet5/for.c @@ -91,6 +91,7 @@ FORcompress_intern(char **comp_min_val, BAT *o = NULL; char buf[64]; int tt = b->ttype; + ptr mn = NULL, mx = NULL; if ( #ifdef HAVE_HGE @@ -100,12 +101,18 @@ FORcompress_intern(char **comp_min_val, throw(SQL, "for.compress", SQLSTATE(3F000) "for compress: invalid column type"); /* For now we only handle hge, lng, and int -> sht and bte */ - ptr mn = BATmin(b, NULL); - ptr mx = BATmax(b, NULL); + if (!(mn = BATmin(b, NULL))) + throw(SQL, "for.compress", GDK_EXCEPTION); + if (!(mx = BATmax(b, NULL))) { + GDKfree(mn); + throw(SQL, "for.compress", GDK_EXCEPTION); + } BUN cnt = BATcount(b); #ifdef HAVE_HGE if (b->ttype == TYPE_hge) { + GDKfree(mn); + GDKfree(mx); throw(SQL, "for.compress", SQLSTATE(3F000) "for compress: implement type hge"); } else #endif _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list