]> granicus.if.org Git - flex/commit
filter: memory leak free scanner postprocessing.
authorviktor.shepel <shepelvictor@bigmir.net>
Tue, 20 Jun 2017 14:03:42 +0000 (17:03 +0300)
committerWill Estes <westes575@gmail.com>
Mon, 3 Jul 2017 15:45:37 +0000 (11:45 -0400)
commit8a044dbe6d03877c3d8c205ae76be9c41f442237
tree7ae388ded81844ba7ca5492e72034bda3887feed
parentef32155253a100a774c087ae4a6be3fb5c6a375c
filter: memory leak free scanner postprocessing.

**Issue:**
Scanner postprocessing leaks memory during correction of `#line`
directives values and generation of C header file.

**Root cause:**
`filter_fix_linedirs` and `filter_tee_header` functions do not
dispose allocated memory.

**Solution:**
Automatically reclaim affected memory by allocating it on stack
insted of heap. Stack allocation should not be a problem as its
only 512 bytes and there is no recursive calls.
src/filter.c