Changeset: 4742ada53280 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4742ada53280 Modified Files: monetdb5/optimizer/opt_json.c monetdb5/optimizer/opt_macro.c monetdb5/optimizer/opt_pipes.c Branch: linear-hashing Log Message:
A few more Coverity leaks diffs (51 lines): diff --git a/monetdb5/optimizer/opt_json.c b/monetdb5/optimizer/opt_json.c --- a/monetdb5/optimizer/opt_json.c +++ b/monetdb5/optimizer/opt_json.c @@ -44,6 +44,7 @@ OPTjsonImplementation(Client cntxt, MalB q = addArgument(mb, q, bu); q = addArgument(mb, q, br); q = addArgument(mb, q, bj); + pushInstruction(mb,q); j = getArg(q,0); p= getInstrPtr(mb,0); setDestVar(q, newTmpVariable(mb, TYPE_str)); diff --git a/monetdb5/optimizer/opt_macro.c b/monetdb5/optimizer/opt_macro.c --- a/monetdb5/optimizer/opt_macro.c +++ b/monetdb5/optimizer/opt_macro.c @@ -169,8 +169,10 @@ inlineMALblock(MalBlkPtr mb, int pc, Mal /* copy the instruction and fix variable references */ ns[k] = copyInstruction(q); - if( ns[k] == NULL) + if( ns[k] == NULL){ + GDKfree(nv); return -1; + } for (n = 0; n < q->argc; n++) getArg(ns[k], n) = nv[getArg(q, n)]; @@ -311,8 +313,11 @@ replaceMALblock(MalBlkPtr mb, int pc, Ma p = getInstrPtr(mb, pc); q = copyInstruction(getInstrPtr(mc, 0)); /* the signature */ - if( q == NULL) + if( q == NULL){ + GDKfree(cvar); + GDKfree(mvar); return -1; + } q->token = ASSIGNsymbol; mb->stmt[pc] = q; diff --git a/monetdb5/optimizer/opt_pipes.c b/monetdb5/optimizer/opt_pipes.c --- a/monetdb5/optimizer/opt_pipes.c +++ b/monetdb5/optimizer/opt_pipes.c @@ -488,7 +488,7 @@ compileOptimizer(Client cntxt, const cha pipes[j].mb = compiled->def; //fprintFunction(stderr, pipes[j].mb, 0, LIST_MAL_ALL); } - } + } else break; } } if (msg != MAL_SUCCEED || _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list