Closed
Bug 1474928
Opened 7 years ago
Closed 7 years ago
[Static Analysis] Resource leaked in gecko/CrashReporterService.java
Categories
(GeckoView :: General, defect, P3)
Tracking
(firefox-esr52 wontfix, firefox-esr60 wontfix, firefox61 wontfix, firefox62 wontfix, firefox63 fixed)
RESOLVED
FIXED
mozilla63
People
(Reporter: rbartlensky, Assigned: rbartlensky)
References
Details
Attachments
(1 file)
Infer outputs the following:
mobile/android/geckoview/src/main/java/org/mozilla/gecko/CrashReporterService.java:101: error: RESOURCE_LEAK
resource of type `java.io.FileInputStream` acquired by call to `FileInputStream(...)` at line 93 is not released after line 101.
**Note**: potential exception at line 94
99. if (transferred > 0)
100. inFile.delete();
101. > } catch (Exception e) {
102. Log.e(LOGTAG, "exception while copying minidump file: ", e);
103. return false;
mobile/android/geckoview/src/main/java/org/mozilla/gecko/CrashReporterService.java:101: error: RESOURCE_LEAK
resource of type `java.io.FileOutputStream` acquired by call to `FileOutputStream(...)` at line 94 is not released after line 101.
**Note**: potential exception at line 96
99. if (transferred > 0)
100. inFile.delete();
101. > } catch (Exception e) {
102. Log.e(LOGTAG, "exception while copying minidump file: ", e);
103. return false;
Assignee | ||
Comment 1•7 years ago
|
||
mobile/android/geckoview/src/main/java/org/mozilla/gecko/CrashReporterService.java:237: error: RESOURCE_LEAK
resource of type `java.io.FileReader` acquired by call to `new()` at line 236 is not released after line 237.
**Note**: potential exception at line 237
235. try {
236. BufferedReader reader = new BufferedReader(new FileReader(filePath));
237. > return readStringsFromReader(reader, stringMap);
238. } catch (Exception e) {
239. Log.e(LOGTAG, "exception while reading strings: ", e);
mobile/android/geckoview/src/main/java/org/mozilla/gecko/CrashReporterService.java:365: error: RESOURCE_LEAK
resource of type `java.net.HttpURLConnection` acquired to `conn` by call to `openConnectionWithProxy(...)` at line 302 is not released after line 365.
**Note**: potential exception at line 309
363. Log.w(LOGTAG, "Received failure HTTP response code from server: " + conn.getResponseCode());
364. }
365. > } catch (IOException e) {
366. Log.e(LOGTAG, "exception during send: ", e);
367. } catch (URISyntaxException e) {
Comment hidden (mozreview-request) |
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8991345 [details]
Bug 1474928: Close files and connections.
https://reviewboard.mozilla.org/r/256244/#review263526
This looks fine to me. If it's green on try, bombs away.
Attachment #8991345 -
Flags: review?(nalexander) → review+
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Pushed by nerli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d28be9c59ecb
Close files and connections. r=nalexander
Keywords: checkin-needed
Comment 5•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Comment 6•7 years ago
|
||
I'm setting status-firefox62=wontfix because potential resource leaks in the crash reporter won't affect many users. :) If you think we might be losing crash reports without this fix, please feel free to change status-firefox62 and request beta uplift.
status-firefox61:
--- → wontfix
status-firefox62:
--- → wontfix
status-firefox-esr52:
--- → wontfix
status-firefox-esr60:
--- → wontfix
OS: Unspecified → Android
Updated•6 years ago
|
Product: Firefox for Android → GeckoView
Updated•6 years ago
|
Target Milestone: Firefox 63 → mozilla63
You need to log in
before you can comment on or make changes to this bug.
Description
•