docproc: avoid segfault during file closing
commit681e4f5d922b9f0ea968238750d5c5d748eac809
authorYan Zhu <zhuyan2015@foxmail.com>
Mon, 11 Sep 2023 16:03:09 +0000 (12 00:03 +0800)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 13 Apr 2024 15:57:46 +0000 (13 17:57 +0200)
tree01c9da53bb93254143299f9ad0105d3fe893200c
parente1a68741067167dc4837e0a26d3d5c318a631fc7
docproc: avoid segfault during file closing

In the function find_export_symbols, since the fopen file does not
exit when it fails, there is a dereference problem in fclose(fp),
which will cause a segmentation fault.

Signed-off-by: Yan Zhu <zhuyan2015@foxmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
scripts/basic/docproc.c