[27552] in Source-Commits

home help back first fref pref prev next nref lref last post

discuss commit: Fix a double-free() issue in discuss server

daemon@ATHENA.MIT.EDU (Victor Vasiliev)
Sun Dec 22 21:36:01 2013

Date: Sun, 22 Dec 2013 21:35:54 -0500
From: Victor Vasiliev <vasilvv@MIT.EDU>
Message-Id: <201312230235.rBN2ZsIW021351@drugstore.mit.edu>
To: source-commits@MIT.EDU

https://github.com/mit-athena/discuss/commit/98121288c2380b8e13c5218cd7ec4953e4212464
commit 98121288c2380b8e13c5218cd7ec4953e4212464
Author: Victor Vasiliev <vasilvv@mit.edu>
Date:   Sun Dec 22 18:34:51 2013 -0500

    Fix a double-free() issue in discuss server
    
    In case when the client tried to switch from an existing meeting to
    a non-existing one, the client freed the memory from the previous
    meeting, but forgot to null the pointer, which caused the error handler
    to attempt to free it again upon discovering that meeting did not exist
    and cause the server to crash.

 server/coreutil.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/server/coreutil.c b/server/coreutil.c
index 448cdb0..dae6d75 100644
--- a/server/coreutil.c
+++ b/server/coreutil.c
@@ -139,6 +139,7 @@ char *mtg_name;
 	  (void) close (u_control_f);
 	  current_mtg [0] = '\0';
 	  acl_destroy(mtg_acl);
+	  mtg_acl = NULL;
      }
 
      u_trn_f = u_control_f = u_acl_f = 0;

home help back first fref pref prev next nref lref last post