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:
parent
68bec0872f
commit
bf0247af7a
1 changed files with 6 additions and 4 deletions
10
nasm.c
10
nasm.c
|
@ -473,10 +473,12 @@ int main(int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
fclose(ofile);
|
||||
if (ofile && terminate_after_phase)
|
||||
remove(outname);
|
||||
ofile = NULL;
|
||||
if (ofile) {
|
||||
fclose(ofile);
|
||||
if (terminate_after_phase)
|
||||
remove(outname);
|
||||
ofile = NULL;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue