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

Commit 62539e9e authored by Kenny Root's avatar Kenny Root
Browse files

Close file on exception as well

Bug: 5458045
Change-Id: I4c79b9c273ff69dda292e5cc7b2b60f8db2edbd9
parent 2375d163
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -63,6 +63,8 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;

import libcore.io.IoUtils;

/**
 * Holds information about dynamic settings.
 */
@@ -998,8 +1000,8 @@ final class Settings {
                FileUtils.sync(fstr);
                str.close();
                journal.commit();
            }
            catch (Exception  e) {
            } catch (Exception e) {
                IoUtils.closeQuietly(str);
                journal.rollback();
            }