From 4ca4e6b971de2f7e32109dc2b9ba8d3f52dfe2b7 Mon Sep 17 00:00:00 2001 From: RElesgoe Date: Sun, 28 Aug 2016 01:50:03 -0700 Subject: [PATCH] Fix resource leak in client_connect() --- src/client/client_connect.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/client/client_connect.cpp b/src/client/client_connect.cpp index 0165e10..c224227 100644 --- a/src/client/client_connect.cpp +++ b/src/client/client_connect.cpp @@ -554,6 +554,10 @@ namespace pvpgn } packet_destroy(rpacket); + + if (lsock >= 0) + psock_close(lsock); + return sd; }