[coreboot-gerrit] Patch merged into coreboot/master: 2c8f81b cbfstool: cbfs-mkstage.c: Free `buffer` on error path

gerrit at coreboot.org gerrit at coreboot.org
Fri Apr 12 20:22:44 CEST 2013


the following patch was just integrated into master:
commit 2c8f81b57b20c14edf4b77d3f5dcd2bcce717180
Author: Paul Menzel <paulepanter at users.sourceforge.net>
Date:   Thu Apr 11 10:45:11 2013 +0200

    cbfstool: cbfs-mkstage.c: Free `buffer` on error path
    
    Cppcheck warns about a memory leak, present since adding romtool,
    which was renamed to cbfstool, in commit 5d01ec0f.
    
        $ cppcheck --version
        Cppcheck 1.59
        […]
        [cbfs-mkstage.c:170]: (error) Memory leak: buffer
        […]
    
    Indeed the memory pointed to by `buffer` is not freed on the error path,
    so add `free(buffer)` to fix this.
    
    Change-Id: I6cbf82479027747c800c5fe847f20b779e261ef4
    Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
    Reviewed-on: http://review.coreboot.org/3069
    Tested-by: build bot (Jenkins)
    Reviewed-by: Stefan Reinauer <stefan.reinauer at coreboot.org>

Build-Tested: build bot (Jenkins) at Fri Apr 12 13:40:17 2013, giving +1
Reviewed-By: Stefan Reinauer <stefan.reinauer at coreboot.org> at Fri Apr 12 20:22:38 2013, giving +2
See http://review.coreboot.org/3069 for details.

-gerrit



More information about the coreboot-gerrit mailing list