Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Commit c17bb82

Browse files
committed
closed connection to fix security bug.
1 parent 8fa6513 commit c17bb82

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/com/hyperwallet/clientsdk/util/Request.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,11 @@ private BinaryResponse readBinaryResponse() throws IOException {
267267
} catch (IOException e) {
268268
response.setBinaryBody(getBinaryFromStream(connection.getErrorStream()));
269269
}
270-
return response;
270+
finally {
271+
connection.getInputStream().close();
272+
return response;
273+
}
274+
271275
}
272276

273277
private byte[] getBinaryFromStream(final InputStream is) {

0 commit comments

Comments
 (0)