* Two Coverty issues found in 0aacc28bd73ba "x86, amd_ucode: support multiple container files appended together"
@ 2014-07-30 12:07 Andrew Cooper
2014-07-30 16:09 ` Aravind Gopalakrishnan
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Cooper @ 2014-07-30 12:07 UTC (permalink / raw)
To: Aravind Gopalakrishnan; +Cc: coverity, Xen-devel List
Hi,
The most recent Coverity run has found two issues in cpu_request_microcode()
The first is dead code (CID 1229147). The entire clause starting at 409
is dead, as there is indeed no possible way to leave the previous while
loop with error set.
The more concerning is a resource leak (CID 1229148) of mc_amd given
certain "goto out" bits of error handling. One flagged codepath is via
the "goto out" on line 405.
Would you mind taking a look at fixing the error handling?
~Andrew
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Two Coverty issues found in 0aacc28bd73ba "x86, amd_ucode: support multiple container files appended together"
2014-07-30 12:07 Two Coverty issues found in 0aacc28bd73ba "x86, amd_ucode: support multiple container files appended together" Andrew Cooper
@ 2014-07-30 16:09 ` Aravind Gopalakrishnan
0 siblings, 0 replies; 2+ messages in thread
From: Aravind Gopalakrishnan @ 2014-07-30 16:09 UTC (permalink / raw)
To: Andrew Cooper; +Cc: coverity, Xen-devel List
On 7/30/2014 7:07 AM, Andrew Cooper wrote:
> Hi,
>
> The most recent Coverity run has found two issues in cpu_request_microcode()
>
> The first is dead code (CID 1229147). The entire clause starting at 409
> is dead, as there is indeed no possible way to leave the previous while
> loop with error set.
>
> The more concerning is a resource leak (CID 1229148) of mc_amd given
> certain "goto out" bits of error handling. One flagged codepath is via
> the "goto out" on line 405.
>
> Would you mind taking a look at fixing the error handling?
>
>
Ok, I have modified error handling here to simply break out of loop and let
if ( error ) that follows while() to handle free-ing of mc_amd on error.
Have sent patch to fix this.
Thanks,
-Aravind.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-30 16:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-30 12:07 Two Coverty issues found in 0aacc28bd73ba "x86, amd_ucode: support multiple container files appended together" Andrew Cooper
2014-07-30 16:09 ` Aravind Gopalakrishnan
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).