DLNAMediaDatabase.init connection not closed
Posted: Mon May 19, 2014 6:43 am
In the "init" method of DLNAMediaDatabase, the connection returned by the first call to
getConnection() is not closed.
Minor since init is only called once, but its still a memory/resource leak.
public void init(boolean force) {
dbCount = -1;
String version = null;
Connection conn = null;
ResultSet rs = null;
Statement stmt = null;
try {
conn = getConnection();
} catch (SQLException se) {
......
)
try {
conn = getConnection();
stmt = conn.createStatement();
......
getConnection() is not closed.
Minor since init is only called once, but its still a memory/resource leak.
public void init(boolean force) {
dbCount = -1;
String version = null;
Connection conn = null;
ResultSet rs = null;
Statement stmt = null;
try {
conn = getConnection();
} catch (SQLException se) {
......
)
try {
conn = getConnection();
stmt = conn.createStatement();
......