#fixed code
                             public InputStream compress(InputStream input) throws CompressException {
		FileOutputStream outputStream = null;
		FileOutputStream tempFileOutputStream = null;
		try {
			File temp = File.createTempFile("commons_","jkt");
			tempFileOutputStream = new FileOutputStream(temp);
			compressTo(input, tempFileOutputStream);
			return new FileInputStream(temp);
		} catch (IOException e) {
			throw new CompressException("An IO Exception has occured", e);
		} finally {
			try {
                if(tempFileOutputStream != null) {
    				tempFileOutputStream.close();
                }
                if(outputStream != null) {
    				outputStream.close();
                }
			} catch (IOException e) {
				throw new CompressException("An IO Exception occured while closing the streams", e);
			}
		}
	}
#vulnerable code 
                             public InputStream compress(InputStream input) throws CompressException {
		FileOutputStream outputStream = null;
		FileOutputStream tempFileOutputStream = null;
		try {
			File temp = File.createTempFile("commons_","jkt");
			tempFileOutputStream = new FileOutputStream(temp);
			compressTo(input, tempFileOutputStream);
			return new FileInputStream(temp);
		} catch (IOException e) {
			throw new CompressException("An IO Exception has occured", e);
		} finally {
			try {
				tempFileOutputStream.close();
				outputStream.close();
			} catch (IOException e) {
				throw new CompressException("An IO Exception occured while closing the streams", e);
			}
		}
	} 
                            #location 13 
                            #vulnerability type NULL_DEREFERENCE