Fix memory leak in FinalizeCCTx (#1329)

This commit is contained in:
Mihailo Milenkovic
2019-03-12 13:18:16 +01:00
committed by jl777
parent 20f1f8d8ce
commit bd8e9da786

View File

@@ -290,6 +290,16 @@ std::string FinalizeCCTx(uint64_t CCmask,struct CCcontract_info *cp,CMutableTran
cc_free(othercond3); cc_free(othercond3);
if ( othercond4 != 0 ) if ( othercond4 != 0 )
cc_free(othercond4); cc_free(othercond4);
if ( othercond1of2 != 0 )
cc_free(othercond1of2);
if ( othercond1of2tokens != 0 )
cc_free(othercond1of2tokens);
if ( mytokenscond != 0 )
cc_free(mytokenscond);
if ( mysingletokenscond != 0 )
cc_free(mysingletokenscond);
if ( othertokenscond != 0 )
cc_free(othertokenscond);
std::string strHex = EncodeHexTx(mtx); std::string strHex = EncodeHexTx(mtx);
if ( strHex.size() > 0 ) if ( strHex.size() > 0 )
return(strHex); return(strHex);