Skip to content

Commit

Permalink
Fixes resource leak
Browse files Browse the repository at this point in the history
Signed-off-by: CapXilinx <[email protected]>
  • Loading branch information
MartinMelikMerkumians committed Feb 5, 2018
1 parent 0d9d3aa commit 1defbe3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/src/ports/generic_networkhandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,8 @@ int CreateUdpSocket(UdpCommuncationDirection communication_direction,
if (SetSocketToNonBlocking(new_socket) < 0) {
OPENER_TRACE_ERR(
"error setting socket to non-blocking on new socket\n");
CloseSocket(new_socket);
OPENER_ASSERT(false); /* This should never happen! */
return kEipStatusError;
}

Expand Down

0 comments on commit 1defbe3

Please sign in to comment.