From c0c754f7f5b7f3443af01b91cd46ebf1b887c63c Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 16 Mar 2023 15:28:48 -0400 Subject: [PATCH] MT#55283 fix possible mem leaks Functions that keep their own sdp_ng_flags must clean up the struct after they're done with it. Change-Id: I54e87d6c5ff0b5a9e4be5731f69ac9b35097f684 --- daemon/call_interfaces.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/daemon/call_interfaces.c b/daemon/call_interfaces.c index 646b0f2f7..9fc8085c6 100644 --- a/daemon/call_interfaces.c +++ b/daemon/call_interfaces.c @@ -2863,7 +2863,7 @@ const char *call_start_forwarding_ng(bencode_item_t *input, bencode_item_t *outp AUTO_CLEANUP_NULL(struct call *call, call_unlock_release); struct call_monologue *monologue; const char *errstr = NULL; - struct sdp_ng_flags flags; + AUTO_CLEANUP(struct sdp_ng_flags flags, call_ng_free_flags); errstr = media_block_match(&call, &monologue, &flags, input, OP_OTHER); if (errstr) @@ -2892,7 +2892,7 @@ const char *call_stop_forwarding_ng(bencode_item_t *input, bencode_item_t *outpu AUTO_CLEANUP_NULL(struct call *call, call_unlock_release); struct call_monologue *monologue; const char *errstr = NULL; - struct sdp_ng_flags flags; + AUTO_CLEANUP(struct sdp_ng_flags flags, call_ng_free_flags); errstr = media_block_match(&call, &monologue, &flags, input, OP_OTHER); if (errstr) @@ -2969,7 +2969,7 @@ const char *call_block_dtmf_ng(bencode_item_t *input, bencode_item_t *output) { AUTO_CLEANUP_NULL(struct call *call, call_unlock_release); struct call_monologue *monologue; const char *errstr = NULL; - struct sdp_ng_flags flags; + AUTO_CLEANUP(struct sdp_ng_flags flags, call_ng_free_flags); errstr = media_block_match(&call, &monologue, &flags, input, OP_OTHER); if (errstr) @@ -3010,7 +3010,7 @@ const char *call_unblock_dtmf_ng(bencode_item_t *input, bencode_item_t *output) AUTO_CLEANUP_NULL(struct call *call, call_unlock_release); struct call_monologue *monologue; const char *errstr = NULL; - struct sdp_ng_flags flags; + AUTO_CLEANUP(struct sdp_ng_flags flags, call_ng_free_flags); errstr = media_block_match(&call, &monologue, &flags, input, OP_OTHER); if (errstr) @@ -3068,7 +3068,7 @@ static const char *call_block_silence_media(bencode_item_t *input, bool on_off, AUTO_CLEANUP_NULL(struct call *call, call_unlock_release); struct call_monologue *monologue; const char *errstr = NULL; - struct sdp_ng_flags flags; + AUTO_CLEANUP(struct sdp_ng_flags flags, call_ng_free_flags); errstr = media_block_match(&call, &monologue, &flags, input, OP_OTHER); if (errstr)