#fixed code
                                public static byte[] tryDecompress(InputStream raw) throws Exception {

        try {
            GZIPInputStream gis
                    = new GZIPInputStream(raw);
            ByteArrayOutputStream out
                    = new ByteArrayOutputStream();

            IOUtils.copy(gis, out);

            return out.toByteArray();
        } catch (Exception e) {
            e.printStackTrace();
        }

        return null;
    }
#vulnerable code 
                                public static byte[] tryDecompress(InputStream raw) throws Exception {

        try {
            GZIPInputStream gis
                    = new GZIPInputStream(raw);
            ByteArrayOutputStream out
                    = new ByteArrayOutputStream();


            IoUtils.copy(gis, out);

            return out.toByteArray();
        } catch (Exception e) {
            e.printStackTrace();
        }

        return null;
    } 
                            #location 10 
                            #vulnerability type RESOURCE_LEAK