Michael Butler 7ecc290745 Move NN_TRY macro out of struct initialization
NNAPI NN_TRY macros use Statement Expressions (a GNU extension) to
propagate errors. However, a "return" statement in a Statement
Expression can lead to memory leaks when the Statement Expression is
being used to initialize a member of a struct. Specifically, when one member of a struct is already initialized, and a Statement Expression used to initialize a subsequent member early-returns, the previously initialized members will not have their destructors called.

This CL moves any NN_TRY macro out of struct initialization to avoid any
potential memory leaks.

Bug: 230500484
Test: mma
Test: presubmit
Change-Id: I3493fd4764f8eacc86750e6414e62bc891abaccd
2022-04-28 22:05:37 +00:00
2021-12-14 01:45:47 +00:00
2022-04-23 00:53:43 +00:00
2022-04-20 03:33:16 +00:00
2022-01-26 09:50:04 -08:00
2022-04-16 07:03:24 +09:00
2022-04-16 07:03:24 +09:00
2022-04-16 07:03:24 +09:00
2021-06-02 16:01:53 -07:00
2022-04-16 07:03:24 +09:00
2022-04-16 07:03:24 +09:00
2022-04-16 07:03:24 +09:00
2022-04-16 07:03:24 +09:00
2021-12-14 01:45:47 +00:00
2022-04-16 07:03:24 +09:00
2022-04-16 07:03:24 +09:00
2022-04-16 07:03:24 +09:00
2022-04-16 07:03:24 +09:00
2021-12-14 01:45:47 +00:00
2021-10-28 22:04:46 +00:00
2019-12-13 14:24:23 -08:00
2022-04-25 16:35:42 +00:00
2016-08-30 11:28:36 -07:00
2020-12-16 18:09:12 +00:00
2021-01-21 15:06:51 +09:00
Description
No description provided
134 MiB
Languages
C++ 56.3%
AIDL 41.2%
C 1.5%
Rust 0.4%
Java 0.4%
Other 0.1%