mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Fix some memory leaks.
These memory leaks were found and fixed by John Hardin. I'm just committing them for him. ASTERISK-24736 #close Reported by Mark Michelson Review: https://reviewboard.asterisk.org/r/4389 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1004,13 +1004,14 @@ static struct ast_json *dtmf_end_to_json(
|
||||
const char *direction =
|
||||
ast_json_string_get(ast_json_object_get(blob, "direction"));
|
||||
const struct timeval *tv = stasis_message_timestamp(message);
|
||||
struct ast_json *json_channel = ast_channel_snapshot_to_json(snapshot, sanitize);
|
||||
struct ast_json *json_channel;
|
||||
|
||||
/* Only present received DTMF end events as JSON */
|
||||
if (strcasecmp("Received", direction) != 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
json_channel = ast_channel_snapshot_to_json(snapshot, sanitize);
|
||||
if (!json_channel) {
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user