mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 06:48:25 +00:00
Resolve FORWARD_NULL static analysis warnings
This resolves core findings from ASTERISK-19650 numbers 0-2, 6, 7, 9-11, 14-20, 22-24, 28, 30-32, 34-36, 42-56, 82-84, 87, 89-90, 93-102, 104, 105, 109-111, and 115. Finding numbers 26, 33, and 29 were already resolved. Those skipped were either extended/deprecated or in areas of code that shouldn't be disturbed. (Closes issue ASTERISK-19650) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@366167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1192,7 +1192,7 @@ struct iax_frame *iax_frame_new(int direction, int datalen, unsigned int cacheab
|
||||
AST_LIST_TRAVERSE_SAFE_END;
|
||||
}
|
||||
if (!fr) {
|
||||
if (iax_frames->size >= FRAME_CACHE_MAX_SIZE && smallest) {
|
||||
if (iax_frames && iax_frames->size >= FRAME_CACHE_MAX_SIZE && smallest) {
|
||||
/* Make useless cache into something more useful */
|
||||
AST_LIST_REMOVE(&iax_frames->list, smallest, list);
|
||||
if (!(fr = ast_realloc(smallest, sizeof(*fr) + datalen))) {
|
||||
|
||||
Reference in New Issue
Block a user