Changeset: 113bc21582b0 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=113bc21582b0 Modified Files: sql/backends/monet5/sql.c Branch: Jan2014 Log Message:
Avoid NULL dereference diffs (20 lines): 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 @@ -1942,9 +1942,13 @@ DELTAbat(bat *result, bat *col, bat *uid } c = BATdescriptor(*col); - if ((res = BATcopy(c, TYPE_void, c->ttype, TRUE)) == NULL) - throw(MAL, "sql.delta", OPERATION_FAILED); - BBPunfix(c->batCacheid); + if ( c ) { + if ((res = BATcopy(c, TYPE_void, c->ttype, TRUE)) == NULL){ + BBPunfix(c->batCacheid); + throw(MAL, "sql.delta", OPERATION_FAILED); + } + BBPunfix(c->batCacheid); + } if ((u_val = BATdescriptor(*uval)) == NULL) throw(MAL, "sql.delta", RUNTIME_OBJECT_MISSING); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list