mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-19 11:13:09 +00:00
various: cleanup issues found during leak hunt
In this collection of small patches to prevent Valgrind errors are: fixes for reference leaks in config hooks, evaluating a parameter beyond bounds, and accessing a structure after a lock where it could have been already free'd. Review: https://reviewboard.asterisk.org/r/4407/ ........ Merged revisions 431583 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431584 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1856,7 +1856,7 @@ void ast_join_delim(char *s, size_t len, const char * const w[], unsigned int si
|
||||
/* Join words into a string */
|
||||
if (!s)
|
||||
return;
|
||||
for (x = 0; ofs < len && w[x] && x < size; x++) {
|
||||
for (x = 0; ofs < len && x < size && w[x] ; x++) {
|
||||
if (x > 0)
|
||||
s[ofs++] = delim;
|
||||
for (src = w[x]; *src && ofs < len; src++)
|
||||
|
Reference in New Issue
Block a user