res_pjsip_sdp_rtp,sorcery: Fix invalid access and memory leak respectively.

Valgrind found a memory leak and invalid access.

* Fix invalid access by sscanf() being fed a non-nul terminated string of
digits in res/res_pjsip_sdp_rtp.c:get_codecs().

* Fix memory leak in main/sorcery.c:sorcery_object_field_destructor().

* Fix potential NULL pointer dereference in
main/xmldoc.c:xmldoc_get_syntax_config_option().

Review: https://reviewboard.asterisk.org/r/4513/
........

Merged revisions 433199 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Richard Mudgett
2015-03-20 18:27:22 +00:00
parent 627cc16a8d
commit 148e8799fe
3 changed files with 7 additions and 2 deletions

View File

@@ -1078,6 +1078,7 @@ static void sorcery_object_field_destructor(void *obj)
if (object_field->name_regex) {
regfree(object_field->name_regex);
ast_free(object_field->name_regex);
}
}