summaryrefslogtreecommitdiff
path: root/output
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2009-11-06 11:42:11 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2009-11-06 22:00:49 +0300
commit24f9398a6f66eb395341e420cd4dc14da7d9d40d (patch)
treeb2e091e4c455028507501cd0e834dfc3b4f4ea67 /output
parentb9771908b6674eeb06dfbe396ec1f701f7779fad (diff)
downloadnasm-24f9398a6f66eb395341e420cd4dc14da7d9d40d.tar.gz
nasm-24f9398a6f66eb395341e420cd4dc14da7d9d40d.tar.bz2
nasm-24f9398a6f66eb395341e420cd4dc14da7d9d40d.zip
output/outelf64.c: simplify stabs64_cleanup, dwarf64_cleanup
nasm_free is failsafe against NULL passed Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'output')
-rw-r--r--output/outelf64.c39
1 files changed, 13 insertions, 26 deletions
diff --git a/output/outelf64.c b/output/outelf64.c
index 34fda6b..0e1fb9f 100644
--- a/output/outelf64.c
+++ b/output/outelf64.c
@@ -1856,12 +1856,9 @@ static void stabs64_cleanup(void)
ptr = ptr->next;
nasm_free(del);
}
- if (stabbuf)
- nasm_free(stabbuf);
- if (stabrelbuf)
- nasm_free(stabrelbuf);
- if (stabstrbuf)
- nasm_free(stabstrbuf);
+ nasm_free(stabbuf);
+ nasm_free(stabrelbuf);
+ nasm_free(stabstrbuf);
}
/* dwarf routines */
static void dwarf64_init(void)
@@ -2180,26 +2177,16 @@ static void dwarf64_generate(void)
static void dwarf64_cleanup(void)
{
- if (arangesbuf)
- nasm_free(arangesbuf);
- if (arangesrelbuf)
- nasm_free(arangesrelbuf);
- if (pubnamesbuf)
- nasm_free(pubnamesbuf);
- if (infobuf)
- nasm_free(infobuf);
- if (inforelbuf)
- nasm_free(inforelbuf);
- if (abbrevbuf)
- nasm_free(abbrevbuf);
- if (linebuf)
- nasm_free(linebuf);
- if (linerelbuf)
- nasm_free(linerelbuf);
- if (framebuf)
- nasm_free(framebuf);
- if (locbuf)
- nasm_free(locbuf);
+ nasm_free(arangesbuf);
+ nasm_free(arangesrelbuf);
+ nasm_free(pubnamesbuf);
+ nasm_free(infobuf);
+ nasm_free(inforelbuf);
+ nasm_free(abbrevbuf);
+ nasm_free(linebuf);
+ nasm_free(linerelbuf);
+ nasm_free(framebuf);
+ nasm_free(locbuf);
}
static void dwarf64_findfile(const char * fname)
{