Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Slider 0.91
-
None
Description
Resource leaks were found in the following files -
slider-core/src/main/java/org/apache/slider/client/SliderClient.java
1184 IOUtils.write(keystore, new FileOutputStream(storeFile));
leaked_resource: Failing to save or close resource created by new java.io.FileOutputStream(storeFile) leaks it.
slider-core/src/main/java/org/apache/slider/api/proto/RestTypeMarshalling.java
111 InputStream is = new FileInputStream(securityStore.getFile()); 112 return IOUtils.toByteArray(is);
noescape: Resource is is not closed or saved in toByteArray.
leaked_resource: Variable is going out of scope leaks the resource it refers to.