Skip to content

Commit

Permalink
Close leaked statement.
Browse files Browse the repository at this point in the history
  • Loading branch information
ukiuni committed Sep 11, 2014
1 parent 0e0263d commit 293e400
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/org/ukiuni/irc4j/db/Database.java
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@ public void registJoinChannel(User user, String channelName) {
stmt.setString(2, channelName);
rs = stmt.executeQuery();
if (!rs.next()) {
IOUtil.close(stmt);
stmt = con.prepareStatement("insert into user_and_channel_relation (user_id, channel_name, created_at) values (?, ?, now())");
stmt.setLong(1, user.getId());
stmt.setString(2, channelName);
Expand Down

0 comments on commit 293e400

Please sign in to comment.