Closed Bug 1474967 Opened 6 years ago Closed 6 years ago

[Static Analysis] Resources leaked in gecko/media/GeckoMediaDrmBridgeV21.java

Categories

(GeckoView :: Media, defect, P3)

Unspecified
Android
defect

Tracking

(firefox-esr52 wontfix, firefox-esr60 wontfix, firefox61 wontfix, firefox62 wontfix, firefox63 fixed)

RESOLVED FIXED
mozilla63
Tracking Status
firefox-esr52 --- wontfix
firefox-esr60 --- wontfix
firefox61 --- wontfix
firefox62 --- wontfix
firefox63 --- fixed

People

(Reporter: rbartlensky, Assigned: rbartlensky)

References

Details

Attachments

(1 file)

mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoMediaDrmBridgeV21.java:507: error: RESOURCE_LEAK
  resource of type `java.io.InputStreamReader` acquired by call to `new()` at line 493 is not released after line 507.
**Note**: potential exception at line 497
  505.                       Log.d(LOGTAG, "Provisioning, server returned HTTP error code :" + responseCode);
  506.                   }
  507. >             } catch (IOException e) {
  508.                   Log.e(LOGTAG, "Got exception during posting provisioning request ...", e);
  509.               } catch (URISyntaxException e) {

mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoMediaDrmBridgeV21.java:505: error: RESOURCE_LEAK
  resource of type `java.net.HttpURLConnection` acquired by call to `openConnectionWithProxy(...)` at line 478 is not released after line 505.
  503.                       if (mResponseBody != null) Log.d(LOGTAG, "response length=" + mResponseBody.length);
  504.                   } else {
  505. >                     Log.d(LOGTAG, "Provisioning, server returned HTTP error code :" + responseCode);
  506.                   }
  507.               } catch (IOException e) {

mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoMediaDrmBridgeV21.java:493: error: RESOURCE_LEAK
  resource of type `java.net.HttpURLConnection` acquired to `urlConnection` by call to `openConnectionWithProxy(...)` at line 478 is not released after line 493.
  491.                   if (responseCode == HttpURLConnection.HTTP_OK) {
  492.                       BufferedReader in =
  493. >                       new BufferedReader(new InputStreamReader(urlConnection.getInputStream(), StringUtils.UTF_8));
  494.                       String inputLine;
  495.                       StringBuffer response = new StringBuffer();
Comment on attachment 8991571 [details]
Bug 1474967: Fix resource leaks.

https://reviewboard.mozilla.org/r/256498/#review263528

Sure.
Attachment #8991571 - Flags: review?(nalexander) → review+
Blocks: infer
Keywords: checkin-needed
Pushed by nerli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dd8b72cfda82
Fix resource leaks. r=nalexander
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/dd8b72cfda82
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
I'm setting status-firefox62=wontfix because potential resource leaks in DRM video playback won't affect many users. If you think this is a serious issue, please feel free to change status-firefox62 and request beta uplift.
OS: Unspecified → Android
Product: Firefox for Android → GeckoView
Target Milestone: Firefox 63 → mozilla63

Moving some media bugs to the new GeckoView::Media component.

Component: General → Media
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: