Skip to content

Commit 22d7c6a

Browse files
committed
Merge pull request #3 from samgabriel/master
Fixes #2 memory leak due to retained reference to the lastWarning in the SQLDiagnostic
2 parents 85c0c40 + abe61eb commit 22d7c6a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/net/sourceforge/jtds/jdbc/SQLDiagnostic.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ void addDiagnostic(int number,
408408
*/
409409
void clearWarnings() {
410410
warnings = null;
411+
lastWarning = null;
411412
}
412413

413414
/**
@@ -420,6 +421,7 @@ void checkErrors() throws SQLException {
420421
if (exceptions != null) {
421422
SQLException tmp = exceptions;
422423
exceptions = null;
424+
lastException = null;
423425
throw tmp;
424426
}
425427
}

0 commit comments

Comments
 (0)