Memory leak in RooProdPdf::processProductTerm?

running HypoTestInverter on the model defined via workspace I observe significant
(actually killing) memory leak of ~200K/toy.
Valgrind reports a suspicions in RooProdPdf::processProductTerm:

==25455== 21,005,312 bytes in 20,513 blocks are possibly lost in loss record 78,202 of 78,202
==25455== at 0x402398C: operator new[](unsigned long) (vg_replace_malloc.c:305)
==25455== by 0xEC265FF: RooNameSet::RooNameSet() (in /afs/
==25455== by 0xEC26B74: RooNormSetCache::RooNormSetCache(int) (in /afs/
==25455== by 0xEC341C0: RooCacheManager::RooCacheManager(RooAbsArg*, int) (in /afs/
==25455== by 0xEC33BD8: RooObjCacheManager::RooObjCacheManager(RooAbsArg*, int, bool) (in /afs/
==25455== by 0xEC51E27: RooProduct::RooProduct(char const*, char const*, RooArgSet const&) (in /afs/
==25455== by 0xEC44DEB: RooProdPdf::processProductTerm(RooArgSet const*, RooArgSet const*, char const*, RooArgSet const*, RooArgSet const&, RooArgSet const&, bool&, bool) const (in /afs/
==25455== by 0xEC4C16F: RooProdPdf::getPartIntList(RooArgSet const*, RooArgSet const*, RooArgList*&, RooLinkedList*&, int&, char const*) const (in /afs/
==25455== by 0xEC50103: RooProdPdf::evaluate() const (in /afs/
==25455== by 0xEB1C7AB: RooAbsPdf::getVal(RooArgSet const*) const (in /afs/
==25455== by 0xEC614A6: RooRealIntegral::evaluate() const (in /afs/
==25455== by 0xEB2882A: RooAbsReal::traceEval(RooArgSet const*) const (in /afs/

In the RooProdPdf::processProductTerm code there is a suspicious fragment indeed:

} else {

  // CASE IIIb: Normalized and partially integrated composite PDF term

  // Use auxiliary class RooGenProdProj to calculate this term
  const char* name = makeRGPPName("GENPROJ_",*term,termISet,termNSet,isetRangeName) ;
  RooAbsReal* partInt = new RooGenProdProj(name,name,*term,termISet,termNSet,isetRangeName) ;
  partInt->setStringAttribute("PROD_TERM_TYPE","IIIb") ;
  //partInt->setOperMode(operMode()) ;

  //cout << "processProductTerm(" << GetName() << ") case IIIb func = " << partInt->GetName() << endl ;
  isOwned=kTRUE ;
  ret[0] = partInt ;
  const char* name1 = makeRGPPName("PROD",*term,RooArgSet(),RooArgSet(),0) ;

  RooProduct* tmp_prod = new RooProduct(name1,name1,*term) ;
  ret[1] = tmp_prod->createIntegral(termISet,isetRangeName) ;
  ret[2] = tmp_prod->createIntegral(termNSet,normRange()) ;

  return ret ;

It’s not obvious who is going to take care of deleting tmp_prod RooProduct object created in this fragment.

If this could be a reason for the leak, what is the work around?