Module Name: src Committed By: rillig Date: Thu Mar 25 21:45:10 UTC 2021
Modified Files: src/usr.bin/xlint/lint1: init.c Log Message: lint: free the designator as soon as it is no longer needed One of the latest "refactorings" introduced a small and practically unimportant memory leak. If the last initializer in an initialization had a designator, that designator was not freed. When the "current initialization" was still a global variable with unlimited lifetime, it was freed at the beginning of the next initialization. After the refactorings, this "next initialization" could no longer see anything from the previous initialization since all references have been cleaned up at that point. Freeing the memory so late and in an almost totally unrelated place was a bad idea anyway. To generate a diff of this commit: cvs rdiff -u -r1.129 -r1.130 src/usr.bin/xlint/lint1/init.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.