mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 14:58:25 +00:00
func_jitterbuffer: fix frame leaks.
Fix code paths where it is possible for frames to leak. Fix uninitialized variable in jb_get_fixed and jb_get_adaptive. ASTERISK-22409 #related Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4128/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@427019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -647,7 +647,7 @@ static int jb_put_fixed(void *jb, struct ast_frame *fin, long now)
|
||||
static int jb_get_fixed(void *jb, struct ast_frame **fout, long now, long interpl)
|
||||
{
|
||||
struct fixed_jb *fixedjb = (struct fixed_jb *) jb;
|
||||
struct fixed_jb_frame frame;
|
||||
struct fixed_jb_frame frame = { .data = &ast_null_frame };
|
||||
int res;
|
||||
|
||||
res = fixed_jb_get(fixedjb, &frame, now, interpl);
|
||||
@@ -743,7 +743,7 @@ static int jb_put_adaptive(void *jb, struct ast_frame *fin, long now)
|
||||
static int jb_get_adaptive(void *jb, struct ast_frame **fout, long now, long interpl)
|
||||
{
|
||||
jitterbuf *adaptivejb = (jitterbuf *) jb;
|
||||
jb_frame frame;
|
||||
jb_frame frame = { .data = &ast_null_frame };
|
||||
int res;
|
||||
|
||||
res = jb_get(adaptivejb, &frame, now, interpl);
|
||||
|
||||
Reference in New Issue
Block a user