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
pull/1642/head
Richard Fuchs 2 years ago
parent 833c30d69e
commit c0c754f7f5

@ -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)

Loading…
Cancel
Save