Initialize counters in ast_sched_report so that resulting data is not bogus.
authorMark Michelson <mmichelson@digium.com>
Wed, 3 Feb 2010 19:26:53 +0000 (19:26 +0000)
committerMark Michelson <mmichelson@digium.com>
Wed, 3 Feb 2010 19:26:53 +0000 (19:26 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244547 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/sched.c

index 86c0114..8699cfb 100644 (file)
@@ -512,6 +512,7 @@ void ast_sched_report(struct sched_context *con, struct ast_str **buf, struct as
        int countlist[cbnames->numassocs + 1];
        size_t heap_size;
        
+       memset(countlist, 0, sizeof(countlist));
        ast_str_set(buf, 0, " Highwater = %d\n schedcnt = %d\n", con->highwater, con->schedcnt);
 
        ast_mutex_lock(&con->lock);