On Tue, Oct 24, 2023 at 08:35:58PM +0530, Sughosh Ganu wrote: > hi Tom, > > On Tue, 24 Oct 2023 at 06:48, Tom Rini <tr...@konsulko.com> wrote: > > > > Here's the latest report > > > > ---------- Forwarded message --------- > > From: <scan-ad...@coverity.com> > > Date: Mon, Oct 23, 2023 at 4:40 PM > > Subject: New Defects reported by Coverity Scan for Das U-Boot > > To: <tom.r...@gmail.com> > > > > > > Hi, > > > > Please find the latest report on new defect(s) introduced to Das > > U-Boot found with Coverity Scan. > > > > 16 new defect(s) introduced to Das U-Boot found with Coverity Scan. > > 6 defect(s), reported by Coverity Scan earlier, were marked fixed in > > the recent build analyzed by Coverity Scan. > > > > New defect(s) Reported-by: Coverity Scan > > Showing 16 of 16 defect(s) > > > > <snip> > > > > > ** CID 467053: (RESOURCE_LEAK) > > /tools/mkeficapsule.c: 859 in dump_capsule_contents() > > /tools/mkeficapsule.c: 859 in dump_capsule_contents() > > > > > > ________________________________________________________________________________________________________ > > *** CID 467053: (RESOURCE_LEAK) > > /tools/mkeficapsule.c: 859 in dump_capsule_contents() > > 853 empty_capsule_dump(ptr); > > 854 } else { > > 855 fprintf(stderr, "Unable to decode the capsule > > file: %s\n", > > 856 capsule_file); > > 857 exit(EXIT_FAILURE); > > 858 } > > >>> CID 467053: (RESOURCE_LEAK) > > >>> Variable "ptr" going out of scope leaks the storage it points to. > > 859 } > > 860 > > 861 /** > > 862 * main - main entry function of mkeficapsule > > 863 * @argc: Number of arguments > > 864 * @argv: Array of pointers to arguments > > /tools/mkeficapsule.c: 859 in dump_capsule_contents() > > 853 empty_capsule_dump(ptr); > > 854 } else { > > 855 fprintf(stderr, "Unable to decode the capsule > > file: %s\n", > > 856 capsule_file); > > 857 exit(EXIT_FAILURE); > > 858 } > > >>> CID 467053: (RESOURCE_LEAK) > > >>> Variable "ptr" going out of scope leaks the storage it points to. > > 859 } > > 860 > > 861 /** > > 862 * main - main entry function of mkeficapsule > > 863 * @argc: Number of arguments > > 864 * @argv: Array of pointers to arguments > > > > <snip> > > > ** CID 467045: Resource leaks (RESOURCE_LEAK) > > /tools/mkeficapsule.c: 859 in dump_capsule_contents() > > > > > > ________________________________________________________________________________________________________ > > *** CID 467045: Resource leaks (RESOURCE_LEAK) > > /tools/mkeficapsule.c: 859 in dump_capsule_contents() > > 853 empty_capsule_dump(ptr); > > 854 } else { > > 855 fprintf(stderr, "Unable to decode the capsule > > file: %s\n", > > 856 capsule_file); > > 857 exit(EXIT_FAILURE); > > 858 } > > >>> CID 467045: Resource leaks (RESOURCE_LEAK) > > >>> Handle variable "fd" going out of scope leaks the handle. > > 859 } > > 860 > > 861 /** > > 862 * main - main entry function of mkeficapsule > > 863 * @argc: Number of arguments > > 864 * @argv: Array of pointers to arguments > > > > > > Both the pointer and file descriptor are not being freed since the > process exits once the dump_capaule_contents() function returns. These > can be marked as false positives. Thanks.
I would say that's "intentional" rather than false positive (and perhaps a bad example) but indeed not a fatal problem. Thanks for checking. -- Tom
signature.asc
Description: PGP signature