From: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch 2/6] usb: gadget: uvc: cleanup __uvcg_fill_strm()
Date: Fri, 16 Jan 2015 12:44:44 +0000 [thread overview]
Message-ID: <54B907BC.9090207@samsung.com> (raw)
In-Reply-To: <20150114210107.GB23203@mwanda>
W dniu 16.01.2015 o 13:12, Dan Carpenter pisze:
> Oh, yeah. You're right. I should have been more careful and I should
> have seen that. Sorry. But the problem is the original code is still a
> bit buggy.
>
> We call:
>
> data = kzalloc();
>
> Inside __uvcg_fill_strm() we do "data += something;"
>
> kfree(data);
>
> We should save the orignal data pointer so that we can free it
> correctly at the end in uvcg_streaming_class_allow_link().
>
Yeah, right. Thank you for spotting this. The kfree() is called
only if __uvcg_fill_strm() fails, though. But of course this needs
to be fixed.
AP
next prev parent reply other threads:[~2015-01-16 12:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-14 21:01 [patch 2/6] usb: gadget: uvc: cleanup __uvcg_fill_strm() Dan Carpenter
2015-01-16 11:38 ` Andrzej Pietrasiewicz
2015-01-16 12:12 ` Dan Carpenter
2015-01-16 12:44 ` Andrzej Pietrasiewicz [this message]
2015-01-19 16:09 ` Felipe Balbi
2015-01-19 17:46 ` Dan Carpenter
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=54B907BC.9090207@samsung.com \
--to=andrzej.p@samsung.com \
--cc=kernel-janitors@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).