aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-11-15 21:32:18 +0000
committerMatt Fleming <matt.fleming@intel.com>2012-11-15 21:32:18 +0000
commit39acf04ff0eda2e86b53187bee31c6c67e058491 (patch)
treed142cfa2541be457d175fe7667d5160d0afd2a10
parentc6ce504b8b79729a4e0acc2bebc5e497e4098e60 (diff)
downloadsyslinux-39acf04ff0eda2e86b53187bee31c6c67e058491.tar.gz
syslinux-39acf04ff0eda2e86b53187bee31c6c67e058491.tar.xz
syslinux-39acf04ff0eda2e86b53187bee31c6c67e058491.zip
chainboot: Delete extraneous free() in chainboot_file()
We don't need to call free(buf) if we're jumping to the 'bail' label because 'buf' is always free'd there. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r--com32/elflink/ldlinux/chainboot.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/com32/elflink/ldlinux/chainboot.c b/com32/elflink/ldlinux/chainboot.c
index 4a4a2e1a..ff19c530 100644
--- a/com32/elflink/ldlinux/chainboot.c
+++ b/com32/elflink/ldlinux/chainboot.c
@@ -54,10 +54,8 @@ void chainboot_file(const char *file, uint32_t type)
goto bail;
rv = open_file(file, &fd);
- if (rv == -1) {
- free(buf);
+ if (rv == -1)
goto bail;
- }
reg.eax.l = max;
reg.ebx.l = 0;