diff options
author | Jenkins2 <jenkins2@gerrit.asterisk.org> | 2017-12-19 14:46:02 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-12-19 14:46:02 -0600 |
commit | 204dd027dd65125761194ec6a52c02883fd64eb1 (patch) | |
tree | cf98cd1974b30b768dc5ffa4e0a985839d193b09 | |
parent | 33213a5220eb3d9b17a76b936b069383717097a4 (diff) | |
parent | bf33a09c37c6eb906587827ded8ea68669baf36a (diff) |
Merge "core: Fix multiple trivial issues in the core."
-rw-r--r-- | main/sdp.c | 1 | ||||
-rw-r--r-- | main/translate.c | 5 | ||||
-rw-r--r-- | main/utils.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/main/sdp.c b/main/sdp.c index fd10ba8c3..7e283ebf8 100644 --- a/main/sdp.c +++ b/main/sdp.c @@ -845,6 +845,7 @@ static struct ast_stream *get_stream_from_m(const struct ast_sdp_a_lines *a_line rtp_codecs_free(codecs); ast_stream_free(stream); ao2_ref(caps, -1); + ast_free(codecs); return NULL; } ast_stream_set_data(stream, AST_STREAM_DATA_RTP_CODECS, codecs, diff --git a/main/translate.c b/main/translate.c index ce4745ce0..02717c5ed 100644 --- a/main/translate.c +++ b/main/translate.c @@ -497,6 +497,7 @@ struct ast_trans_pvt *ast_translator_build_path(struct ast_format *dst, struct a ast_log(LOG_WARNING, "No translator path from %s to %s\n", ast_format_get_name(src), ast_format_get_name(dst)); AST_RWLIST_UNLOCK(&translators); + ast_translator_free_path(head); return NULL; } if ((t->dst_codec.sample_rate == ast_format_get_sample_rate(dst)) && (t->dst_codec.type == ast_format_get_type(dst))) { @@ -505,9 +506,7 @@ struct ast_trans_pvt *ast_translator_build_path(struct ast_format *dst, struct a if (!(cur = newpvt(t, explicit_dst))) { ast_log(LOG_WARNING, "Failed to build translator step from %s to %s\n", ast_format_get_name(src), ast_format_get_name(dst)); - if (head) { - ast_translator_free_path(head); - } + ast_translator_free_path(head); AST_RWLIST_UNLOCK(&translators); return NULL; } diff --git a/main/utils.c b/main/utils.c index 931a1ae50..85228c183 100644 --- a/main/utils.c +++ b/main/utils.c @@ -2615,7 +2615,7 @@ void ast_set_default_eid(struct ast_eid *eid) unsigned char full_mac[6] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; s = socket(AF_INET, SOCK_STREAM, 0); - if (s <= 0) { + if (s < 0) { ast_log(LOG_WARNING, "Unable to open socket for seeding global EID. " "You will have to set it manually.\n"); return; |