From: Mike Frysinger Date: Wed, 19 Oct 2011 14:21:23 -0400 Subject: [U-Boot] [PATCH 2/2] disk: part_efi: fix **pgpt_pte == NULL In-Reply-To: <1319047487-9926-2-git-send-email-dianders@chromium.org> References: <1319047487-9926-1-git-send-email-dianders@chromium.org> <1319047487-9926-2-git-send-email-dianders@chromium.org> Message-ID: <201110191421.24193.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 Wednesday 19 October 2011 14:04:47 Doug Anderson wrote: > - debug("%s: gpt-entry at 0x%08X\n", __func__, (unsigned int)*pgpt_pte); > + debug("%s: gpt-entry at 0x%p\n", __func__, gpt_pte); i like %x->%p, but i think this change is incorrect. doesn't %p output a leading 0x already ? > /* Remember to free pte */ > - if (*pgpt_pte != NULL) { > - debug("%s: Freeing pgpt_pte\n", __func__); > - free(*pgpt_pte); > + if (gpt_pte != NULL) { > + debug("%s: Freeing gpt_pte\n", __func__); > + free(gpt_pte); > } useless if() check. free(NULL) works fine. change it to always call free(). there are a few more like this below. -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/20111019/069dd85b/attachment.pgp