Page 1 of 1

DLNAMediaDatabase.init connection not closed

Posted: Mon May 19, 2014 6:43 am
by rme
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();
......

Re: DLNAMediaDatabase.init connection not closed

Posted: Mon May 19, 2014 5:47 pm
by SubJunk
Thanks a lot, hopefully a fix will be in the next version :)