asterisk/main/editline
Matthew Jordan 7b51320642 Fix a variety of memory leaks
This patch addresses a number of memory leaks in a variety of modules that were
found by a static analysis tool.  A brief summary of the changes:

* app_minivm:       free ast_str objects on off nominal paths
* app_page:         free the ast_dial object if the requested channel technology
                    cannot be appended to the dialing structure
* app_queue:        if a penalty rule failed to match any existing rule list
                    names, the created rule would not be inserted and its memory
                    would be leaked
* app_read:         dispose of the created silence detector in the presence of
                    off nominal circumstances
* app_voicemail:    dispose of an allocated unique ID field for MWI event
                    un-subscribe requests in off nominal paths; dispose of
                    configuration objects when using the secret.conf option
* chan_dahdi:       dispose of the allocated frame produced by ast_dsp_process
* chan_iax2:        properly unref peer in CLI command "iax2 unregister"
* chan_sip:         dispose of the allocated frame produced by sip_rtp_read's
                    call of ast_dsp_process; free memory in parse unit tests
* func_dialgroup:   properly deref ao2 object grhead in nominal path of
                    dialgroup_read
* func_odbc:        free resultset in off nominal paths of odbc_read
* cli:              free match_list in off nominal paths of CLI match completion
* config:           free comment_buffer/list_buffer when configuration file load
                    is unchanged; free the same buffers any time they were
                    created and config files were processed
* data:             free XML nodes in various places
* enum:             free context buffer in off nominal paths
* features:         free ast_call_feature in off nominal paths of applicationmap
                    config processing
* netsock2:         users of ast_sockaddr_resolve pass in an ast_sockaddr struct
                    that is allocated by the method.  Failures in
                    ast_sockaddr_resolve could result in the users of the method
                    not knowing whether or not the buffer was allocated.  The
                    method will now not allocate the ast_sockaddr struct if it
                    will return failure.
* pbx:              cleanup hash table traversals in off nominal paths; free
                    ignore pattern buffer if it already exists for the specified
                    context
* xmldoc:           cleanup various nodes when we no longer need them
* main/editline:    various cleanup of pointers not being freed before being
                    assigned to other memory, cleanup along off nominal paths
* menuselect/mxml:  cleanup of value buffer for an attribute when that attribute
                    did not specify a value
* res_calendar*:    responses are allocated via the various *_request method
                    returns and should not be allocated in the various
                    write_event methods; ensure attendee buffer is freed if no
                    data exists in the parsed node; ensure that calendar objects
                    are de-ref'd appropriately
* res_jabber:       free buffer in off nominal path
* res_musiconhold:  close the DIR* object in off nominal paths
* res_rtp_asterisk: if we run out of ports, close the rtp socket object and free
                    the rtp object
* res_srtp:         if we fail to create the session in libsrtp, destroy the
                    temporary ast_srtp object

(issue ASTERISK-19665)
Reported by: Matt Jordan

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

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

Merged revisions 366881 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-18 14:43:44 +00:00
..
TEST merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
np Merged revisions 179395 via svnmerge from 2009-03-02 20:16:51 +00:00
readline merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
CHANGES merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
INSTALL merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
Makefile.in Add gar to the check for AR for those silly OSes (Solaris) that don't have ar. 2010-04-27 21:13:01 +00:00
PLATFORMS merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
README merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
chared.c merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
chared.h merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
common.c merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
config.guess merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
config.h.in merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
config.sub merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
configure Add gar to the check for AR for those silly OSes (Solaris) that don't have ar. 2010-04-27 21:13:01 +00:00
configure.in Add gar to the check for AR for those silly OSes (Solaris) that don't have ar. 2010-04-27 21:13:01 +00:00
editline.3 merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
editrc.5 merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
el.c merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
el.h merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
emacs.c merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
hist.c merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
hist.h merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
histedit.h merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
history.c merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
install-sh merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
key.c merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
key.h merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
makelist.in Merged revisions 129343 via svnmerge from 2008-07-09 13:44:43 +00:00
map.c merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
map.h merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
parse.c merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
parse.h merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
prompt.c merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
prompt.h merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
read.c Merged revisions 163761 via svnmerge from 2008-12-12 22:04:26 +00:00
read.h merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
readline.c Fix a variety of memory leaks 2012-05-18 14:43:44 +00:00
refresh.c add -Wundef to the --enable-dev-mode flags, so that mistyped macro names in #if expressions will be caught 2007-02-18 15:03:42 +00:00
refresh.h merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
search.c merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
search.h merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
sig.c merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
sig.h merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
sys.h Eliminate remaining libedit warnings (shown in bamboo) 2010-03-03 15:54:28 +00:00
term.c Fix a variety of memory leaks 2012-05-18 14:43:44 +00:00
term.h merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
tokenizer.c Fix a variety of memory leaks 2012-05-18 14:43:44 +00:00
tokenizer.h merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
tty.c merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
tty.h merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
vi.c merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00

README

libedit is a command line editing and history library.  It is designed to be
used by interactive programs that allow the user to type commands at a terminal
prompt.

The following files may be of direct interest to the user:

* CHANGES - Software change log.

* INSTALL - Installation information.

* PLATFORMS - Supported platforms and platform-specific information.