summaryrefslogtreecommitdiff
path: root/tools/net/ynl/generated/handshake-user.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-06-06 22:43:01 +0300
committerJakub Kicinski <kuba@kernel.org>2023-06-07 22:53:10 +0300
commit58da455b31baf87dd74b71fc54d0356e05c0bf49 (patch)
treea16642c51d329b448b9a873cd5a41784df22d2bb /tools/net/ynl/generated/handshake-user.c
parent2cc9671a82e3ba8911f01b04fd8f8f2da3a238a7 (diff)
downloadlinux-58da455b31baf87dd74b71fc54d0356e05c0bf49.tar.xz
tools: ynl-gen: improve unwind on parsing errors
When parsing multi-attr we count the objects and then allocate an array to hold the parsed objects. If an attr space has multiple multi-attr objects, however, if parsing the first array fails we'll leave the object count for the second even tho the second array was never allocated. This may cause crashes when freeing objects on error. Count attributes to a variable on the stack and only set the count in the object once the memory was allocated. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/net/ynl/generated/handshake-user.c')
0 files changed, 0 insertions, 0 deletions