From: Mark Michelson Date: Tue, 16 Oct 2007 15:21:58 +0000 (+0000) Subject: Fixing a double free which happens in the statechange thread. X-Git-Tag: 1.4.14~142 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=661aa4ba35fdb31ce84d10babacd7719e1aa40b8;p=thirdparty%2Fasterisk.git Fixing a double free which happens in the statechange thread. (closes issue #10987, reported by andrew) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@85852 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_queue.c b/apps/app_queue.c index fbdab1babb..3fee3f28bf 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -543,7 +543,6 @@ static void *handle_statechange(struct statechange *sc) if (loc) { *loc++ = '\0'; } else { - free(sc); return NULL; } @@ -564,7 +563,6 @@ static void *handle_statechange(struct statechange *sc) if (!curint) { if (option_debug > 2) ast_log(LOG_DEBUG, "Device '%s/%s' changed to state '%d' (%s) but we don't care because they're not a member of any queue.\n", technology, loc, sc->state, devstate2str(sc->state)); - free(sc); return NULL; } @@ -613,8 +611,6 @@ static void *handle_statechange(struct statechange *sc) } AST_LIST_UNLOCK(&queues); - free(sc); - return NULL; }