Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e86f052

Browse filesBrowse files
committed
fix:leaky st
1 parent 866739e commit e86f052
Copy full SHA for e86f052

File tree

Expand file treeCollapse file tree

1 file changed

+5
-2
lines changed
Open diff view settings
Filter options
  • JavaSecurity/CodeReview/JavaSec-Code/MybatiSqli/src/main/java/com/drunkbaby/controller
Expand file treeCollapse file tree

1 file changed

+5
-2
lines changed
Open diff view settings
Collapse file

‎JavaSecurity/CodeReview/JavaSec-Code/MybatiSqli/src/main/java/com/drunkbaby/controller/SQLI.java‎

Copy file name to clipboardExpand all lines: JavaSecurity/CodeReview/JavaSec-Code/MybatiSqli/src/main/java/com/drunkbaby/controller/SQLI.java
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,17 @@ public String jdbc_sqli_sec(@RequestParam("username") String username) {
120120
logger.info(info);
121121
}
122122

123-
rs.close();
124-
con.close();
123+
125124

126125
} catch (ClassNotFoundException e) {
127126
logger.error("Sorry, can`t find the Driver!");
128127
e.printStackTrace();
129128
} catch (SQLException e) {
130129
logger.error(e.toString());
130+
} finally {
131+
st.close();
132+
rs.close();
133+
con.close();
131134
}
132135
return result.toString();
133136
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.