- MMS client: fixed potential problem in multi-variable write response parsing

pull/246/head
Michael Zillgith 5 years ago
parent 27ae0a5c0f
commit 4a3702112e

@ -589,6 +589,7 @@ IedConnection_setGoCBValues(IedConnection self, IedClientError* error, ClientGoo
} }
*error = iedConnection_mapMmsErrorToIedError(mmsError); *error = iedConnection_mapMmsErrorToIedError(mmsError);
goto exit_function; goto exit_function;
} }
else { else {

@ -132,8 +132,12 @@ mmsClient_parseWriteMultipleItemsResponse(ByteBuffer* message, int32_t bufPos, M
exit_with_error: exit_with_error:
*mmsError = MMS_ERROR_PARSING_RESPONSE; *mmsError = MMS_ERROR_PARSING_RESPONSE;
if (accessResults != NULL) if (accessResults != NULL) {
LinkedList_destroyDeep(*accessResults, (LinkedListValueDeleteFunction) MmsValue_delete); if (*accessResults) {
LinkedList_destroyDeep(*accessResults, (LinkedListValueDeleteFunction) MmsValue_delete);
*accessResults = NULL;
}
}
} }

Loading…
Cancel
Save