miscellaneous update.

This commit is contained in:
Gatsby Van
2023-12-26 21:09:17 +08:00
parent 81a26ea3b3
commit 25ac8b0784
+4 -2
View File
@@ -161,8 +161,6 @@ int MPC_Init(MPC_INST** instPtr, MPC_CONFIG* configPtr){
goto init_failed;
}
memset(mpcRecord, 0x00, sizeof(MPC_RECORD));
mpcTxMsgBuff = bit_array_create(STATE_STROAGE_BUFF_MAX*8);
if(mpcTxMsgBuff == NULL){
goto init_failed;
@@ -173,6 +171,10 @@ int MPC_Init(MPC_INST** instPtr, MPC_CONFIG* configPtr){
}
return Status;
memset(mpcRecord, 0x00, sizeof(MPC_RECORD));
memset(mpcTxMsgBuff, 0x00, sizeof(STATE_STROAGE_BUFF_MAX*8));
memset(mpcRxMsgBuff, 0x00, sizeof(MPC_MSG_LEN_MAX));
init_failed:
free(*instPtr);
free(mpcRecord);