From a5f0000db010e84d4508a8aa480e4360b6609718 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Thu, 2 Feb 2006 21:50:47 +0000 Subject: [PATCH] 2006-02-02 Eric Christopher Wade Tregaskis * output/outmacho.c (macho_cleanup): Depend on symbols existing. --- output/outmacho.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/output/outmacho.c b/output/outmacho.c index e3603b7f..0917cbeb 100644 --- a/output/outmacho.c +++ b/output/outmacho.c @@ -1256,11 +1256,13 @@ static void macho_cleanup(int debuginfo) saa_free(strs); raa_free(extsyms); - while (syms->next) { - sym = syms; - syms = syms->next; + if (syms) { + while (syms->next) { + sym = syms; + syms = syms->next; - nasm_free (sym); + nasm_free (sym); + } } }