From: Mike Frysinger Date: Fri, 26 Aug 2011 15:22:37 -0400 Subject: [U-Boot] [PATCH 5/8] net: emaclite: Use dynamic allocation In-Reply-To: <1314362843-18214-5-git-send-email-monstr@monstr.eu> References: <1314362843-18214-1-git-send-email-monstr@monstr.eu> <1314362843-18214-4-git-send-email-monstr@monstr.eu> <1314362843-18214-5-git-send-email-monstr@monstr.eu> Message-ID: <201108261522.38474.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Friday, August 26, 2011 08:47:20 Michal Simek wrote: > dev = calloc(1, sizeof(*dev)); > if (dev == NULL) > return -1; > > + emaclite = calloc(1, sizeof(struct xemaclite)); > + if (emaclite == NULL) > + return -1; and you just leaked the dev alloc :) -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20110826/57baf421/attachment.pgp