mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
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
This commit is contained in:
@@ -543,7 +543,6 @@ static void *handle_statechange(struct statechange *sc)
|
|||||||
if (loc) {
|
if (loc) {
|
||||||
*loc++ = '\0';
|
*loc++ = '\0';
|
||||||
} else {
|
} else {
|
||||||
free(sc);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -564,7 +563,6 @@ static void *handle_statechange(struct statechange *sc)
|
|||||||
if (!curint) {
|
if (!curint) {
|
||||||
if (option_debug > 2)
|
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));
|
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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -613,8 +611,6 @@ static void *handle_statechange(struct statechange *sc)
|
|||||||
}
|
}
|
||||||
AST_LIST_UNLOCK(&queues);
|
AST_LIST_UNLOCK(&queues);
|
||||||
|
|
||||||
free(sc);
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user