[chocolate-doom] 39/79: Fix double free of addresses
Jonathan Dowland
jmtd at moszumanska.debian.org
Mon Jan 30 15:07:23 UTC 2017
This is an automated email from the git hooks/post-receive script.
jmtd pushed a commit to annotated tag chocolate-doom-0.1.3
in repository chocolate-doom.
commit 0a55e76dc58993267abb4b0cde944f1babecc242
Author: Simon Howard <fraggle at gmail.com>
Date: Sun Jan 8 03:36:40 2006 +0000
Fix double free of addresses
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 267
---
src/net_client.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/src/net_client.c b/src/net_client.c
index b123286..b2fef28 100644
--- a/src/net_client.c
+++ b/src/net_client.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: net_client.c 265 2006-01-08 02:53:31Z fraggle $
+// $Id: net_client.c 267 2006-01-08 03:36:40Z fraggle $
//
// Copyright(C) 2005 Simon Howard
//
@@ -21,6 +21,9 @@
// 02111-1307, USA.
//
// $Log$
+// Revision 1.12 2006/01/08 03:36:40 fraggle
+// Fix double free of addresses
+//
// Revision 1.11 2006/01/08 02:53:31 fraggle
// Detect when client connection is disconnected.
//
@@ -119,11 +122,14 @@ boolean net_waiting_for_start = false;
static void NET_CL_Shutdown(void)
{
- net_client_connected = false;
+ if (net_client_connected)
+ {
+ net_client_connected = false;
- NET_FreeAddress(server_addr);
+ NET_FreeAddress(server_addr);
- // Shut down network module, etc. To do.
+ // Shut down network module, etc. To do.
+ }
}
// data received while we are waiting for the game to start
@@ -232,6 +238,10 @@ void NET_CL_Run(void)
{
NET_CL_ParsePacket(packet);
}
+ else
+ {
+ NET_FreeAddress(addr);
+ }
NET_FreePacket(packet);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/chocolate-doom.git
More information about the Pkg-games-commits
mailing list