diff options
author | Scott Griepentrog <sgriepentrog@digium.com> | 2015-02-06 21:26:12 +0000 |
---|---|---|
committer | Scott Griepentrog <sgriepentrog@digium.com> | 2015-02-06 21:26:12 +0000 |
commit | 323c0927ac63ce1c13133961bd46abbf6d265a18 (patch) | |
tree | 442ac91b9baf5220443a5be83a8001d33a49198d /main/utils.c | |
parent | 18c8c1bae39e4a236f4cc5b2cfc1d759af624593 (diff) |
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/
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/utils.c')
-rw-r--r-- | main/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/utils.c b/main/utils.c index 7032631f8..578a01e26 100644 --- a/main/utils.c +++ b/main/utils.c @@ -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++) |