DLNAMediaDatabase.init connection not closed

Developers forum for Univeral Media Server-related development (only for programmers)
Post Reply
rme
Posts: 15
Joined: Thu May 01, 2014 10:29 am

DLNAMediaDatabase.init connection not closed

Post 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();
......
User avatar
SubJunk
Lead Developer
Posts: 3754
Joined: Sun May 27, 2012 4:12 pm

Re: DLNAMediaDatabase.init connection not closed

Post by SubJunk »

Thanks a lot, hopefully a fix will be in the next version :)
Post Reply