aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2023-09-08 10:03:50 +0300
committerRob Herring <[email protected]>2023-09-11 09:58:54 -0500
commit55e95bfccf6db8d26a66c46e1de50d53c59a6774 (patch)
tree6508582074d0f776c169a3391f8b87091c198b13 /lib/test_fortify/write_overflow-strncpy-src.c
parent0bb80ecc33a8fb5a682236443c1e740d5c917d1d (diff)
of: dynamic: Fix potential memory leak in of_changeset_action()
Smatch complains that the error path where "action" is invalid leaks the "ce" allocation: drivers/of/dynamic.c:935 of_changeset_action() warn: possible memory leak of 'ce' Fix this by doing the validation before the allocation. Note that there is not any actual problem with upstream kernels. All callers of of_changeset_action() are static inlines with fixed action values. Fixes: 914d9d831e61 ("of: dynamic: Refactor action prints to not use "%pOF" inside devtree_lock") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/r/[email protected]/ Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions