Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit adfb5592 authored by James Dong's avatar James Dong
Browse files

Fix memory leak from retrieval of getSupportedDrmInfo.

Change-Id: Ic2192a9791c0a3c5e5357b4367a2d8bfb15af20c
parent f8c45a90
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -101,6 +101,7 @@ status_t DrmManager::loadPlugIns(const String8& plugInDirPath) {
            DrmSupportInfo* info = mPlugInManager.getPlugIn(plugInPath).getSupportInfo(0);
            if (NULL != info) {
                mSupportInfoToPlugInIdMap.add(*info, plugInPath);
                delete info;
            }
        }
    }
@@ -178,6 +179,7 @@ status_t DrmManager::installDrmEngine(int uniqueId, const String8& absolutePath)

    DrmSupportInfo* info = rDrmEngine.getSupportInfo(0);
    mSupportInfoToPlugInIdMap.add(*info, absolutePath);
    delete info;

    return DRM_NO_ERROR;
}