Changeset: 863e92504bb1 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=863e92504bb1 Modified Files: clients/mapiclient/dump.c monetdb5/mal/mal_instruction.c monetdb5/scheduler/srvpool.c Branch: Jan2014 Log Message:
Some more coverity issues diffs (65 lines): diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c --- a/clients/mapiclient/dump.c +++ b/clients/mapiclient/dump.c @@ -1938,6 +1938,8 @@ dump_database(Mapi mid, stream *toConsol return rc; bailout: + if( curschema ) + free(curschema); if (hdl) { if (mapi_result_error(hdl)) mapi_explain_result(hdl, stderr); diff --git a/monetdb5/mal/mal_instruction.c b/monetdb5/mal/mal_instruction.c --- a/monetdb5/mal/mal_instruction.c +++ b/monetdb5/mal/mal_instruction.c @@ -1573,7 +1573,7 @@ defConstant(MalBlkPtr mb, int type, ValP k = newTmpVariable(mb, type); setVarConstant(mb, k); setVarFixed(mb, k); - if (type >= 0 && type < TYPE_any && ATOMextern(type)) + if (type >= 0 && type < GDKatomcnt && ATOMextern(type)) setVarCleanup(mb, k); else clrVarCleanup(mb, k); diff --git a/monetdb5/scheduler/srvpool.c b/monetdb5/scheduler/srvpool.c --- a/monetdb5/scheduler/srvpool.c +++ b/monetdb5/scheduler/srvpool.c @@ -400,8 +400,12 @@ SRVPOOLregisterInternal(Client cntxt, st msg = RMTregisterInternal(cntxt, servers[srv].conn, userRef, fname); #ifdef DEBUG_RUN_SRVPOOL if ( msg) { - mnstr_printf(cntxt->fdout,"#Failed to register\n"); - printFunction(cntxt->fdout, findSymbol(cntxt->nspace, userRef,putName(fname,strlen(fname)))->def, 0, LIST_MAL_DEBUG); + Symbol sf = findSymbol(cntxt->nspace, userRef,putName(fname,strlen(fname))); + if (sf){ + mnstr_printf(cntxt->fdout,"#Failed to register\n"); + printFunction(cntxt->fdout, sf->def, 0, LIST_MAL_DEBUG); + } else + mnstr_printf(cntxt->fdout,"#undefined registration function\n"); } #endif } else @@ -436,7 +440,7 @@ str SRVPOOLregister(Client cntxt, MalBlk str SRVPOOLscheduler(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci) { - int *res = (int*) getArgReference(stk,pci,0); + int *res = (int*) getArgReference(stk,pci,0), pc=0; str msg = MAL_SUCCEED; (void) mb; @@ -450,9 +454,11 @@ SRVPOOLscheduler(Client cntxt, MalBlkPtr if ( srvtop == 0) SRVPOOLdiscover(cntxt); /* execute block in parallel */ - if ( getPC(mb, pci) > pci->jump) + pc = getPC(mb, pci); + if (pc < 0 || pc > pci->jump) throw(MAL,"scheduler.srvpool","Illegal statement range"); - msg = runMALdataflow(cntxt, mb, getPC(mb,pci), pci->jump, stk); + if ( pc >= 0) + msg = runMALdataflow(cntxt, mb, pc, pci->jump, stk); *res = int_nil; /* continue at end of block */ } return msg; _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list