Skip to content

Commit

Permalink
close streams that needed closing (fixes #1143)
Browse files Browse the repository at this point in the history
  • Loading branch information
iBotPeaches committed Jan 22, 2016
1 parent d5ca4c1 commit 81404c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ public static boolean assembleSmaliFile(File smaliFile,DexBuilder dexBuilder, bo
dexGen.setDexBuilder(dexBuilder);
dexGen.smali_file();

is.close();
reader.close();

return dexGen.getNumberOfSyntaxErrors() == 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ private void buildFile(String fileName, DexBuilder dexBuilder)
}
}

inStream.close();

try {
if (!SmaliMod.assembleSmaliFile(out.toString(),dexBuilder, false, false, inFile)) {
throw new AndrolibException("Could not smali file: " + fileName);
Expand Down

0 comments on commit 81404c8

Please sign in to comment.