[chainmaker]free para malloc'
@@ -40,8 +40,6 @@ const BCHAR * chainmaker_user_cert ="-----BEGIN CERTIFICATE-----\n"
"a1azgQ44SZFRowIhAOSqB0T6fjVYc6owMKfUtUJpEC1XSO/tlHDD0NpdLCWk\n"
"-----END CERTIFICATE-----\n";
-
-
const BCHAR *chainmaker_org_tls_ca_cert = "-----BEGIN CERTIFICATE-----\n"
"MIICaDCCAg2gAwIBAgIDASOLMAoGCCqGSM49BAMCMIGKMQswCQYDVQQGEwJDTjEQ\n"
"MA4GA1UECBMHQmVpamluZzEQMA4GA1UEBxMHQmVpamluZzEfMB0GA1UEChMWd3gt\n"
@@ -87,7 +85,6 @@ void get_time_string(char* time_buf)
time(&rawtime);
info = localtime(&rawtime);
strftime(time_buf, TIME_LEN, "%Y-%m-%d %H:%M:%S", info);
- return;
}
__BOATSTATIC BOAT_RESULT chainmakerWalletPrepare(void)
@@ -192,8 +189,6 @@ int main(int argc, char *argv[])
query_transaction_para.parameters->key = key2;
query_transaction_para.parameters->value = file_hash;
- printf("query = %s\n", query_transaction_para.parameters->key);
- printf("query = %s\n", query_transaction_para.parameters->value);
result = BoatHlchainmakerContractClaimQuery(&tx_ptr, &query_transaction_para, query_metod);
if (result != BOAT_SUCCESS)
{
@@ -206,6 +201,16 @@ int main(int argc, char *argv[])
/* step-7: Boat SDK Deinitialization */
BoatIotSdkDeInit();
+ if (inovke_transaction_para.parameters != NULL)
+ {
+ BoatFree(inovke_transaction_para.parameters);
+ }
+
+ if (query_transaction_para.parameters != NULL)
+ {
+ BoatFree(query_transaction_para.parameters);
+ }
+
return 0;
}
