Files
react-native/ReactAndroid/src/main
Oleksandr Melnykov 8e4b2e7448 Use try-with-resource to prevent output stream to be leaked in BlobProvider
Summary: This diff fixes a potential memory leak which can occur if an exception is thrown inside the try block and `outputStream.close()` is not called. By wrapping `outputStream.write(data)` inside try-with-resource we guarantee that outputStream will be closed regardless of whether the try statement completes normally or abruptly.

Reviewed By: sammy-SC

Differential Revision: D16148850

fbshipit-source-id: c5c0a78b36375857f6e717bb581e8686a4a94bb9
2019-07-10 02:34:52 -07:00
..