Changeset: 82f0db90b12d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=82f0db90b12d Modified Files: monetdb5/modules/atoms/mtime.c sql/backends/monet5/sql.c Branch: Aug2018 Log Message:
Fixed potential leak. diffs (32 lines): diff --git a/monetdb5/modules/atoms/mtime.c b/monetdb5/modules/atoms/mtime.c --- a/monetdb5/modules/atoms/mtime.c +++ b/monetdb5/modules/atoms/mtime.c @@ -3234,7 +3234,7 @@ MTIMEdate_extract_quarter_bulk(bat *ret, const date *t; if ((b = BATdescriptor(*bid)) == NULL) - throw(MAL, "batmtime.quarter", "Cannot access descriptor"); + throw(MAL, "batmtime.quarter", SQLSTATE(HY005) "Cannot access descriptor"); n = BATcount(b); bn = COLnew(b->hseqbase, TYPE_int, n, TRANSIENT); diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c --- a/sql/backends/monet5/sql.c +++ b/sql/backends/monet5/sql.c @@ -1147,11 +1147,13 @@ mvc_grow_wrap(Client cntxt, MalBlkPtr mb (void)cntxt; *res = 0; if ((tid = BATdescriptor(Tid)) == NULL) - throw(SQL, "sql.grow", "Cannot access descriptor"); + throw(SQL, "sql.grow", SQLSTATE(HY005) "Cannot access descriptor"); if (tpe > GDKatomcnt) tpe = TYPE_bat; - if (tpe == TYPE_bat && (ins = BATdescriptor(*(int *) Ins)) == NULL) - throw(SQL, "sql.append", "Cannot access descriptor"); + if (tpe == TYPE_bat && (ins = BATdescriptor(*(int *) Ins)) == NULL) { + BBPunfix(Tid); + throw(SQL, "sql.grow", SQLSTATE(HY005) "Cannot access descriptor"); + } if (ins) { cnt = BATcount(ins); BBPunfix(ins->batCacheid); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list