[jboss-jira] [JBoss JIRA] (ELY-964) Coverity static analysis, Resource leak on an exceptional path, FileAuditEndpoint (elytron)
Ilia Vassilev (JIRA)
issues at jboss.org
Wed Feb 15 07:41:00 EST 2017
[ https://issues.jboss.org/browse/ELY-964?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ilia Vassilev reassigned ELY-964:
---------------------------------
Assignee: Ilia Vassilev (was: Darran Lofthouse)
> Coverity static analysis, Resource leak on an exceptional path, FileAuditEndpoint (elytron)
> -------------------------------------------------------------------------------------------
>
> Key: ELY-964
> URL: https://issues.jboss.org/browse/ELY-964
> Project: WildFly Elytron
> Issue Type: Bug
> Reporter: Martin Choma
> Assignee: Ilia Vassilev
>
> Coverity static analysis found possible occurence of resource leak.
> https://scan7.coverity.com/reports.htm#v23632/p11778/fileInstanceId=9690272&defectInstanceId=2391428&mergedDefectId=1402977
> In constructor when {{fos.getFD()}} will throw exception {{FileOutputStream fos}} won't be closed.
> {code:java|title=FileAuditEndpoint.java}
> FileAuditEndpoint(Builder builder) throws IOException {
> this.dateFormatSupplier = builder.dateFormatSupplier;
> this.syncOnAccept = builder.syncOnAccept;
> FileOutputStream fos = new FileOutputStream(builder.location.toFile(), true);
> this.fileDescriptor = fos.getFD();
> this.outputStream = new BufferedOutputStream(fos);
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list