On Thu, Nov 07, 2024 at 10:47:38AM +0100, Heinrich Schuchardt wrote:
> On 11/7/24 10:31, Michael Nazzareno Trimarchi wrote:
> > Hi
> > 
> > On Thu, Nov 7, 2024 at 10:27 AM Heinrich Schuchardt <[email protected]> 
> > wrote:
> > > 
> > > On 11/3/24 00:36, Michael Nazzareno Trimarchi wrote:
> > > > Hi Tom
> > > > 
> > > > On Sun, Nov 3, 2024 at 12:26 AM Tom Rini <[email protected]> wrote:
> > > > > 
> > > > > On Sat, 26 Oct 2024 08:40:43 +0200, Heinrich Schuchardt wrote:
> > > > > 
> > > > > > With this series opendir, readdir, closedir are implemented for 
> > > > > > ext4.
> > > > > > These functions are needed for the UEFI sub-system to interact with
> > > > > > the ext4 file system.
> > > > > > 
> > > > > > To reduce code growth the functions are reused to implement the ls
> > > > > > command for ext4.
> > > > > > 
> > > > > > [...]
> > > > > 
> > > > > Applied to local tree/v2-tidy-test-dir, thanks!
> > > > > 
> > > > Am I sleeping?
> > > > 
> > > > int ext4fs_opendir(const char *dirname, struct fs_dir_stream **dirsp) {
> > > >       struct ext4_dir_stream *dirs = NULL;
> > > 
> > > Thank you for your review.
> > > 
> > > We should not set a value that we do not use.
> > > 
> > > >       struct ext2fs_node *dir = NULL;
> > > >       int ret;
> > > > 
> > > >       *dirsp = NULL;
> > > > 
> > > >       dirs = calloc(1, sizeof(struct ext4_dir_stream));
> > > >       if (!dirs)
> > > >           return -ENOMEM;
> > > > 
> > > >       dirs->dirname = strdup(dirname);
> > > >       if (!dirs->dirname) {
> > > 
> > > Yes this line in my code is incorrect.
> > > 
> > 
> > We need to use valgrind in unit test or we need some code analys to
> > automate this process.
> > We are always looking for memory leaks in uboot in exit path or we
> > need to have alloction funciton that
> > automatic free the memory when we go in error path
> 
> Coverity probably would have reported this. But I think we only run it
> on tags.

A challenge with Coverity is that for the free plan we're limited to
basically one run per day, and there's not a good way to handle that
with CI. I am trying to get in the habit of running a scan after I push
my last merge for the day but that's (a) manual and then runs in to (b)
doesn't handle branching as I also didn't see a way for the dashboard to
handle both "master" and "next", on the free plan.

That said, if anyone out there is very good at Coverity stuff and would
like to volunteer to help organize things better, it would be much
appreciated!

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to