From: Tom Rini Date: Mon, 10 Nov 2014 16:28:36 -0500 Subject: [U-Boot] [U-Boot, v1] ZFS: Clean up cppcheck warnings where relevant, leaked memory etc In-Reply-To: <1415322515-86220-1-git-send-email-lundman@lundman.net> References: <1415322515-86220-1-git-send-email-lundman@lundman.net> Message-ID: <20141110212836.GN24724@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Nov 07, 2014 at 10:08:35AM +0900, Jorgen Lundman wrote: > In a message from Wolfgang Denk highlighting warnings from cppcheck, > the patch will address those that are correctly diagnosed. Some are > false-positives: > > > [fs/zfs/zfs.c:937]: (error) Memory leak: l > dmu_read() allocates "l" if successful, so error-case should not free > it. > > [fs/zfs/zfs.c:1141]: (error) Memory leak: dnbuf > dmu_read() allocates "dnbuf" if successful, so error-case should not > free it. > > [fs/zfs/zfs.c:1372]: (error) Memory leak: osp > zio_read() allocates "osp" if successful, so error-case should > not free it. > > [fs/zfs/zfs.c:1726]: (error) Memory leak: nvlist > int_zfs_fetch_nvlist() allocates "nvlist" if successful, so error-case > should not free it. > > Signed-off-by: Jorgen Lundman Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: