Skip to content

Commit

Permalink
- fixed memory leak in IedConnection_setLocalAddress (I6LLCV-97)
Browse files Browse the repository at this point in the history
  • Loading branch information
mzillgith committed Aug 9, 2024
1 parent 3bc94bf commit fd82064
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/mms/iso_common/iso_connection_parameters.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ AcseAuthenticationParameter_setAuthMechanism(AcseAuthenticationParameter self, A
self->mechanism = mechanism;
}


IsoConnectionParameters
IsoConnectionParameters_create()
{
Expand All @@ -75,7 +74,13 @@ IsoConnectionParameters_create()
void
IsoConnectionParameters_destroy(IsoConnectionParameters self)
{
GLOBAL_FREEMEM(self);
if (self)
{
if (self->localIpAddress)
GLOBAL_FREEMEM((void*)(self->localIpAddress));

GLOBAL_FREEMEM(self);
}
}

void
Expand All @@ -89,7 +94,6 @@ IsoConnectionParameters_setTlsConfiguration(IsoConnectionParameters self, TLSCon
#endif
}


void
IsoConnectionParameters_setAcseAuthenticationParameter(IsoConnectionParameters self,
AcseAuthenticationParameter acseAuthParameter)
Expand Down

0 comments on commit fd82064

Please sign in to comment.