From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:9682 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751884AbaAWTqn (ORCPT ); Thu, 23 Jan 2014 14:46:43 -0500 Date: Thu, 23 Jan 2014 14:46:31 -0500 From: Dave Jones To: Greg Kroah-Hartman Cc: Bjorn Helgaas , linux-pci@vger.kernel.org Subject: Re: [scan-admin@coverity.com: New Defects reported by Coverity Scan for Linux] Message-ID: <20140123194631.GA9269@redhat.com> References: <20140123184246.GA7461@google.com> <20140123193405.GB2605@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20140123193405.GB2605@kroah.com> Sender: linux-pci-owner@vger.kernel.org List-ID: On Thu, Jan 23, 2014 at 11:34:05AM -0800, Greg Kroah-Hartman wrote: > On Thu, Jan 23, 2014 at 11:42:46AM -0700, Bjorn Helgaas wrote: > > FYI. I think the first two (related to "name") are valid. I haven't > > figured out the "msi_attrs" one yet. > > I've send a fix for the first two to you now, that should resolve this > issue. > > But the last one, I can't figure out either. I think Coverity doesn't > realize that we saved off the pointer and can get back to it later on, > as it's a non-trivial pointer chain involved here. This is in the error path though, where we're tearing down all that stuff we just built up, so there is no 'later on' afaict. If we took one of the error_* branches, we're not storing this for anything to free later. I've only looked at this quickly, but it looks valid to me. it looks like we're freeing the contents of the array, but not the array itself. Dave