From: Russell Bryant Date: Wed, 19 Sep 2007 15:10:14 +0000 (+0000) Subject: Fix up another potential race condition. Do the loop decrementing use count X-Git-Tag: 1.4.12~53 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=df5599d598525d10e2609878fe9d9e2cdd8155f1;p=thirdparty%2Fasterisk.git Fix up another potential race condition. Do the loop decrementing use count on events with the eventq protected from being changed. (reported on IRC by Ivan) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@83121 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/manager.c b/main/manager.c index 1964bfdfd8..d39de80617 100644 --- a/main/manager.c +++ b/main/manager.c @@ -684,9 +684,8 @@ static void destroy_session(struct mansession *s) AST_LIST_LOCK(&sessions); AST_LIST_REMOVE(&sessions, s, list); num_sessions--; - AST_LIST_UNLOCK(&sessions); - free_session(s); + AST_LIST_UNLOCK(&sessions); } const char *astman_get_header(const struct message *m, char *var)