[fidl] Ensure handles are closed in all error cases.
The contract for fidl_encode and fidl_decode is that all handles must be closed in case of an error. The big refactor to visitors silently broke that contract in error cases where the caller supplied an overly large buffer/handles array. This patch fixes the behavior and adds tests. TEST: /boot/test/sys/fidl-test Change-Id: I50e81f3c9168370f08a4043aad2384ce5ac62b6e
Showing
- system/ulib/fidl/decoding.cpp 12 additions, 6 deletionssystem/ulib/fidl/decoding.cpp
- system/ulib/fidl/encoding.cpp 12 additions, 6 deletionssystem/ulib/fidl/encoding.cpp
- system/utest/fidl/decoding_tests.cpp 85 additions, 0 deletionssystem/utest/fidl/decoding_tests.cpp
- system/utest/fidl/encoding_tests.cpp 52 additions, 0 deletionssystem/utest/fidl/encoding_tests.cpp
Loading
Please register or sign in to comment