# Resource leak in zoom-sdk-android-5.7.6.1918

**URL:** <https://devforum.zoom.us/t/resource-leak-in-zoom-sdk-android-5-7-6-1918/60145>\
**Category:** Android\
**Created:** [November 11, 2021, 3:44pm UTC](https://devforum.zoom.us/t/resource-leak-in-zoom-sdk-android-5-7-6-1918/60145 "2021-11-11T15:44:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![max.gagnon](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@max.gagnon](https://devforum.zoom.us/u/max.gagnon)\
**Post date:** [November 11, 2021, 3:44pm UTC](https://devforum.zoom.us/t/resource-leak-in-zoom-sdk-android-5-7-6-1918/60145/1 "2021-11-11T15:44:07Z")

</div>

**Description**  
While creating an `Activity` that extends `MeetingActivity`, in the `super.onCreate()` call there is a resource leak that is detected by Android’s `StrictMode` that has `detectLeakedClosableObjects()` enabled.

It appears there is a resource leak within `us.zoom.androidlib.utils.ZmRomUtils.getSystemProperty` where there is a FileInputStream that is opened but never closed.

**Which Android Meeting SDK version?**  
zoom-sdk-android-5.7.6.1918

**Screenshots**  
_Decompiled us.zoom.androidlib.utils.ZmRomUtils class_

```auto
public static String getSystemProperty(String key, String defValue) {
        if (key == null) {
            return defValue;
        } else {
            Properties properties = new Properties();

            try {
                properties.load(new FileInputStream(new File(Environment.getRootDirectory(), "build.prop")));
                return properties.getProperty(key, defValue);
            } catch (Exception var4) {
                ZMLog.e("ZmRomUtils", var4, "getSystemProperty exception, key=%s", new Object[]{key});
                return defValue;
            }
        }
    }

```

_Example Error stacktrace:_

```auto
2021-10-22 10:59:47.978 14278-14290/com.my.app E/StrictMode: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
    java.lang.Throwable: Explicit termination method 'close' not called
        at dalvik.system.CloseGuard.open(CloseGuard.java:180)
        at java.io.FileInputStream.<init>(FileInputStream.java:147)
        at us.zoom.androidlib.utils.ZmRomUtils.getSystemProperty(ZmRomUtils.java:93)
        at us.zoom.androidlib.utils.ZmRomUtils.getMIUIVersionCode(ZmRomUtils.java:74)
        at us.zoom.androidlib.utils.ZmRomUtils.isImmersedModeSupported(ZmRomUtils.java:61)
        at com.zipow.videobox.ConfActivity.isImmersedModeEnabled(ConfActivity.java:1)
        at us.zoom.sdk.MeetingActivity.isImmersedModeEnabled(MeetingActivity.java:1)
        at com.zipow.videobox.ConfActivityNormal.onCreate(ConfActivityNormal.java:9)
        at us.zoom.sdk.MeetingActivity.onCreate(MeetingActivity.java:1)
        at com.my.app.activities.MyMeetingActivity.onCreate(MyMeetingActivity.java:18)
        at android.app.Activity.performCreate(Activity.java:6679)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
        at android.app.ActivityThread.-wrap12(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6119)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

```

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [November 11, 2021, 11:06pm UTC](https://devforum.zoom.us/t/resource-leak-in-zoom-sdk-android-5-7-6-1918/60145/2 "2021-11-11T23:06:33Z")

</div>

Hi @max.gagnon, thanks for using our SDK.

Thanks for pointing this out. We will investigate this and keep you updated as soon as we have identified any new information.

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [December 12, 2021, 9:06am UTC](https://devforum.zoom.us/t/resource-leak-in-zoom-sdk-android-5-7-6-1918/60145/3 "2021-12-12T09:06:46Z")

</div>

Closed on December 12, 2021, 9:06am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
