cli.c: Fix tab completion of "module load" when MALLOC_DEBUG is enabled.

filename_completion_function() returns memory that was not allocated by
the MALLOC_DEBUG allocation tracker so the memory must be freed by
ast_std_free().
........

Merged revisions 421600 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 421602 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 421608 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/13@421616 f38db490-d61c-443f-a65b-d21fe96a405b
chan_pjsip: Update media translation paths when new SDP negotiated.

On a SIP reinvite that changes media strams, the PJSIP channel driver was
flooding the log with "Asked to transmit frame type %s, while native
formats is %s" warnings.

* Fixes PJSIP not setting up translation paths when the formats change on
a reinvite.  AFS-63 was effectively reintroduced because of the media
formats work.  res_pjsip_sdp_rtp.c:set_caps()

* Improved the unexpected frame format WARNING message to include more
information.

* Added protective locking while altering formats on a channel.  Reworked
set_format() to simplify and protect the formats under manipulation.

* Restored some code that got lost in the media_formats work.
(channel.c:set_format() and res_pjsip_sdp_rtp.c:set_caps())

AFS-137 #close
Reported by: Mark Michelson

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/13@421645 f38db490-d61c-443f-a65b-d21fe96a405b