From f08bd17fabd3cf0cf7e4f81a7574de92cd2cb961 Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Wed, 26 May 2004 17:01:26 +0000 Subject: memory leak fix by Barry Scott CVS patchset: 6593 CVS date: 2004/05/26 17:01:26 --- src/input/input_v4l.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/input/input_v4l.c b/src/input/input_v4l.c index 17ff3c06f..60a6dbb23 100644 --- a/src/input/input_v4l.c +++ b/src/input/input_v4l.c @@ -1581,9 +1581,9 @@ static void v4l_plugin_dispose (input_plugin_t *this_gen) { lprintf("Freeing allocated audio frames"); if (this->aud_frames) { buf_element_t *cur_frame = this->aud_frames; - buf_element_t *next_frame = NULL; - while ((next_frame = cur_frame->next) != NULL) { + while (cur_frame != NULL) { + buf_element_t *next_frame = cur_frame->next; #ifdef LOG printf("."); #endif @@ -1606,9 +1606,9 @@ static void v4l_plugin_dispose (input_plugin_t *this_gen) { lprintf("Freeing allocated video frames"); if (this->vid_frames) { buf_element_t *cur_frame = this->vid_frames; - buf_element_t *next_frame = NULL; - while ((next_frame = cur_frame->next) != NULL) { + while (cur_frame != NULL) { + buf_element_t *next_frame = cur_frame->next; #ifdef LOG printf("."); #endif -- cgit v1.2.3