diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-08-19 11:22:27 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-08-19 13:00:44 +0100 |
commit | 29a479c3ceada7343974730c8c9eeaea0a5c9d1f (patch) | |
tree | 4624771fa4141985f20d0d64551e328933173c6a /jurt | |
parent | 2e333bcf78c6ee5d8aa9fe5edda910e34500bccd (diff) |
coverity#1371379 Resource leak on an exceptional path
Change-Id: I0e26dfe610aa7e2cb5eb292aca239ba5e1ad34d9
Diffstat (limited to 'jurt')
-rw-r--r-- | jurt/com/sun/star/lib/connections/socket/socketConnector.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/jurt/com/sun/star/lib/connections/socket/socketConnector.java b/jurt/com/sun/star/lib/connections/socket/socketConnector.java index 4ce67ce01fa3..e88f1040ac16 100644 --- a/jurt/com/sun/star/lib/connections/socket/socketConnector.java +++ b/jurt/com/sun/star/lib/connections/socket/socketConnector.java @@ -154,6 +154,10 @@ public final class socketConnector implements XConnector { con = new SocketConnection(connectionDescription, socket); } catch (IOException e) { + try { + socket.close(); + } catch(IOException ioException) { + } throw new NoConnectException(e); } connected = true; |