diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2011-03-07 11:18:50 +0300 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2011-03-07 11:18:50 +0300 |
commit | 91a65ba2b761fa8e19083a37184301569f70ddc7 (patch) | |
tree | 8256531f96d079cf6bc156b946721f0c103ca6c0 /nasm.c | |
parent | a59c759e095087f061fb1b45359a53724b31868d (diff) | |
download | nasm-91a65ba2b761fa8e19083a37184301569f70ddc7.tar.gz nasm-91a65ba2b761fa8e19083a37184301569f70ddc7.tar.bz2 nasm-91a65ba2b761fa8e19083a37184301569f70ddc7.zip |
BR3200749: Fix "use after close" file pointer
Cleanup routine might be called several times
so be ready for that.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'nasm.c')
-rw-r--r-- | nasm.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2069,7 +2069,10 @@ static char *no_pp_getline(void) static void no_pp_cleanup(int pass) { (void)pass; /* placate GCC */ - fclose(no_pp_fp); + if (no_pp_fp) { + fclose(no_pp_fp); + no_pp_fp = NULL; + } } static uint32_t get_cpu(char *value) |