Skip to content

Commit

Permalink
Fix memory leak in UDPForwarder. Pullrequest SLikeSoft#64
Browse files Browse the repository at this point in the history
  • Loading branch information
exuvo committed Aug 30, 2022
1 parent bc42499 commit 78cfc2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Source/include/slikenet/defineoverrides.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#define __GET_TIME_64BIT 0
#define USE_SLIDING_WINDOW_CONGESTION_CONTROL 1
//#define RAKNET_SUPPORT_IPV6 1
#define RAKNET_SUPPORT_IPV6 1
#define RAKSTRING_TYPE_IS_UNICODE 0
#define RAKPEER_USER_THREADED 0
// 100MB
Expand Down
2 changes: 2 additions & 0 deletions Source/src/UDPForwarder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,8 @@ void UDPForwarder::UpdateUDPForwarder(void)
}
}

freeaddrinfo(servinfo);

if (fe->socket==INVALID_SOCKET)
sfos.result=UDPFORWARDER_BIND_FAILED;
else
Expand Down

0 comments on commit 78cfc2d

Please sign in to comment.