Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5c32b6da authored by Jean Chalard's avatar Jean Chalard
Browse files

Make sure all FDs are correctly closed.

In this kind of series of calls, it's possible that an outer call to a
constructor fails, but the inner succeeded.
Example:
try {
    is = new A(new B());
} finally {
    if (null != is) is.close();
}
In this case, if new B() succeeds but new A() throws an
exception, is stays null and the intermediate object is never
closed. This is what was happening in this instance.

Bug: 7377336
Change-Id: I3fae9fec1135244982fcf5098c76d93f3e0f2add
parent bc43e3f2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment