coverity#1326516 Resource leak on an exceptional path
Change-Id: I91cc5614fb0db76eabd46cbe7e39ae33227728b7
This commit is contained in:
@@ -186,10 +186,14 @@ public final class Driver {
|
||||
merger.merge(convertedFile);
|
||||
mergeIS.close();
|
||||
|
||||
FileOutputStream fos = new FileOutputStream(mergeFile);
|
||||
FileOutputStream fos = null;
|
||||
try {
|
||||
fos = new FileOutputStream(mergeFile);
|
||||
mergeDoc.write(fos);
|
||||
fos.flush();
|
||||
fos.close();
|
||||
} finally {
|
||||
close(fos);
|
||||
}
|
||||
} catch (Exception mergeExcept) {
|
||||
System.out.println("\nThere was an error in the merge");
|
||||
mergeExcept.printStackTrace();
|
||||
|
Reference in New Issue
Block a user