From 30396f816f44d74dda550afe284df5c276366f47 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 21 Jul 2018 07:13:46 -1100 Subject: [PATCH] Fix --- src/cc/assets.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cc/assets.cpp b/src/cc/assets.cpp index 3a94aef02..2de45f93e 100644 --- a/src/cc/assets.cpp +++ b/src/cc/assets.cpp @@ -511,10 +511,6 @@ std::string FinalizeCCTx(uint8_t evalcode,CMutableTransaction &mtx,CPubKey mypk, } } else fprintf(stderr,"FinalizeCCTx couldnt find %s\n",mtx.vin[i].prevout.hash.ToString().c_str()); } - if ( mycond != 0 ) - cc_free(mycond); - if ( othercond != 0 ) - cc_free(othercond); if ( totalinputs >= totaloutputs+2*txfee ) { change = totalinputs - (totaloutputs+txfee); @@ -561,6 +557,10 @@ std::string FinalizeCCTx(uint8_t evalcode,CMutableTransaction &mtx,CPubKey mypk, } } else fprintf(stderr,"FinalizeAssetTx couldnt find %s\n",mtx.vin[i].prevout.hash.ToString().c_str()); } + if ( mycond != 0 ) + cc_free(mycond); + if ( othercond != 0 ) + cc_free(othercond); std::string strHex = EncodeHexTx(mtx); if ( strHex.size() > 0 ) return(strHex);