From: Katya Orlova <e.orlova@ispras.ru>
To: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Cc: Katya Orlova <e.orlova@ispras.ru>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org
Subject: [PATCH] media: s3c-camif: Avoid inappropriate kfree()
Date: Thu, 24 Aug 2023 12:07:25 +0300 [thread overview]
Message-ID: <20230824090725.28148-1-e.orlova@ispras.ru> (raw)
s3c_camif_register_video_node() works with video_device structure stored
as a field of camif_vp,
so it should not be kfreed. But there is video_device_release() on error
path that do it.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: babde1c243b2 ("[media] V4L: Add driver for S3C24XX/S3C64XX SoC series camera interface")
Signed-off-by: Katya Orlova <e.orlova@ispras.ru>
---
drivers/media/platform/samsung/s3c-camif/camif-capture.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/media/platform/samsung/s3c-camif/camif-capture.c b/drivers/media/platform/samsung/s3c-camif/camif-capture.c
index 76634d242b10..79c8ee845c38 100644
--- a/drivers/media/platform/samsung/s3c-camif/camif-capture.c
+++ b/drivers/media/platform/samsung/s3c-camif/camif-capture.c
@@ -1172,7 +1172,6 @@ int s3c_camif_register_video_node(struct camif_dev *camif, int idx)
err_me_cleanup:
media_entity_cleanup(&vfd->entity);
err_vd_rel:
- video_device_release(vfd);
return ret;
}
--
2.30.2
next reply other threads:[~2023-08-24 9:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-24 9:07 Katya Orlova [this message]
2023-09-03 20:23 ` Andi Shyti
2023-09-22 11:55 ` [PATCH v2] " Katya Orlova
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230824090725.28148-1-e.orlova@ispras.ru \
--to=e.orlova@ispras.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=mchehab@kernel.org \
--cc=sylvester.nawrocki@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®