imake: Changes to 'master'

Alan Coopersmith alanc at kemper.freedesktop.org
Thu Sep 6 23:17:53 PDT 2012


 imake.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 5a9246d6804ab8a6f2f23f3f4ace84a415140937
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sat Aug 25 11:19:39 2012 -0700

    Ensure inFile is always closed on error in cppit()
    
    Another instance of the can-return-in-rare-cases nature of LogFatal()
    raising red flags in static analysis.
    
    Resolves warning from Parfait 1.0.1:
    Error: File Leak
       File Leak: Leaked File inFile
            at line 1719 of imake.c in function 'cppit'.
              inFile initialized at line 1699 with fopen
              inFile leaks when inFile != NULL at line 1700
                  and fprintf(inFile, "%s\n", "/* imake - temporary file */") < 0 at line 1702.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

commit 464ba911c3b84abb0140e9f66756d1cc887f78ad
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sat Aug 25 11:10:46 2012 -0700

    Avoid closing inFile twice in CheckImakefileC if LogFatal returns
    
    Imake's LogFatal() checks if it's being re-entered and if so, returns,
    so we can't mark it NORETURN, leading to static analyzers believing it
    can return even in call paths it shouldn't.
    
    Resolves warning from Parfait 1.0.1:
    Error: File Invalid
       File not Initialized: The value inFile is not initialized as a file.
            at line 748 of imake.c in function 'CheckImakefileC'.
              inFile initialized at line 738 with fopen(masterc, "r").
              inFile destroyed at line 745 with fclose(inFile).
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>



More information about the xorg-commit mailing list