]> git.baikalelectronics.ru Git - uboot.git/commit
coccinelle: adjust NULL check before free()
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 19 Apr 2020 09:56:02 +0000 (11:56 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 24 Apr 2020 20:40:09 +0000 (16:40 -0400)
commit77ecec063fd294a602bfe347bec30817a6de836e
tree5c76d1640a2d27dff9dc61b2aa098e277fa992c3
parent864ec1377f358f54ad4813471f828eab6326d106
coccinelle: adjust NULL check before free()

The free() function checks if its argument is NULL. We should avoid
checking for NULL before calling free like in

    if (result->tds)
        free(result->tds);

The list of relevant functions differs between Linux and U-Boot, e.g. we
use free().

Adjust the list of relevant functions.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
scripts/coccinelle/free/ifnullfree.cocci