0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-10-10 00:25:06 -04:00

Don't try to fclose() the output if ofile is NULL

ofile == NULL means no output file is open, so don't try to close the
output file if that is true.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin
2009-07-14 14:47:41 -04:00
parent 68bec0872f
commit bf0247af7a

4
nasm.c
View File

@@ -473,11 +473,13 @@ int main(int argc, char **argv)
} }
} }
if (ofile) {
fclose(ofile); fclose(ofile);
if (ofile && terminate_after_phase) if (terminate_after_phase)
remove(outname); remove(outname);
ofile = NULL; ofile = NULL;
} }
}
break; break;
} }