[PATCH] Fix SIGSEGV on unterminated preprocessor conditional
commit4cebb70b009aa80b63115c6bbae7428bcf17b652
authorLuc Van Oostenryck <luc.vanoostenryck@looxix.net>
Thu, 19 May 2005 20:33:45 +0000 (19 22:33 +0200)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 19 May 2005 23:10:50 +0000 (19 16:10 -0700)
tree1a29a621f52195057a03123f8f64ddcdb2ee7f4b
parentb5529f4bd132d7e711747457671adb2ba7f43d4f
[PATCH] Fix SIGSEGV on unterminated preprocessor conditional

sparse segfaults with the following input:
---
        #ifdef notdef
        oops!
---

The segfault occurs at pre-processor.c:free_preprocessor_line()
because of the extra calls of handle_endif done in do_preproccess()
while trying to do error recoverage.

Fix it by not trying to free the non-existent token line in the
faked endif handling.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@looxix.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
pre-process.c