kfree() calls free. free() checks if the parameter is NULL. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>