aboutsummaryrefslogtreecommitdiffstats
path: root/src/vbidata.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vbidata.c')
-rw-r--r--src/vbidata.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vbidata.c b/src/vbidata.c
index 0a67d22..5886655 100644
--- a/src/vbidata.c
+++ b/src/vbidata.c
@@ -978,6 +978,7 @@ vbidata_t *vbidata_new( const char *filename, vbiscreen_t *vs, int verbose )
vbi->open = 0;
vbi->usexds = 0;
+ vbi->buf = NULL;
vbi->vs = vs;
vbi->verbose = verbose;
@@ -1039,6 +1040,10 @@ static void vbidata_open_device( vbidata_t *vbi )
static void vbidata_close_device( vbidata_t *vbi )
{
close( vbi->fd );
+ if ( vbi->buf != NULL ) {
+ free(vbi->buf);
+ vbi->buf = NULL;
+ }
vbi->open = 0;
}

Privacy Policy