diff --git a/camera/video4linux2.c b/camera/video4linux2.c index dfd37eb1d9..21a6696be0 100644 --- a/camera/video4linux2.c +++ b/camera/video4linux2.c @@ -581,6 +581,8 @@ static void *v4l_init(void) error: RARCH_ERR("V4L2: Failed to initialize camera.\n"); + if (v4l) + free(v4l); return NULL; }