From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aravind Gopalakrishnan Subject: Re: Two Coverty issues found in 0aacc28bd73ba "x86, amd_ucode: support multiple container files appended together" Date: Wed, 30 Jul 2014 11:09:29 -0500 Message-ID: <53D918B9.9080109@amd.com> References: <53D8E011.80801@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53D8E011.80801@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: coverity@xenproject.org, Xen-devel List List-Id: xen-devel@lists.xenproject.org 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.