- IedConnection: fixed potential null pointer dereferences

pull/494/head
Michael Zillgith 2 years ago
parent b84e06eb17
commit 0a177836e6

@ -1884,11 +1884,15 @@ IedConnection_getLogicalDeviceList(IedConnection self, IedClientError* error)
logicalDevice = LinkedList_getNext(logicalDevice);
}
if (error)
*error = IED_ERROR_OK;
return logicalDeviceList;
}
else {
if (error)
*error = IED_ERROR_UNKNOWN;
return NULL;
}
}
@ -3378,8 +3382,8 @@ createDataSetAsyncHandler(uint32_t invokeId, void* parameter, MmsError mmsError,
IedConnectionOutstandingCall call = iedConnection_lookupOutstandingCall(self, invokeId);
if (call) {
if (call)
{
IedConnection_GenericServiceHandler handler = (IedConnection_GenericServiceHandler)call->callback;
IedClientError err = iedConnection_mapMmsErrorToIedError(mmsError);
@ -3494,7 +3498,9 @@ cleanup_list:
exit_function:
if (*error != IED_ERROR_OK) {
if (*error != IED_ERROR_OK)
{
if (call)
iedConnection_releaseOutstandingCall(self, call);
return 0;

Loading…
Cancel
Save