summaryrefslogtreecommitdiffstats
path: root/drm/libdrmframework
diff options
context:
space:
mode:
authorHung Nguyen <hung.nguyen@sonymobile.com>2012-06-05 13:19:53 +0200
committerJames Dong <jdong@google.com>2013-01-24 15:42:42 -0800
commit0bf43848adb00922122b0a0eed2fa0318bde8317 (patch)
treeb8b0ca3491d76059f03e97f695949876b6e153bc /drm/libdrmframework
parent13f7fe763b9ad52fc27f21ed923c46b9555a321f (diff)
downloadframeworks_av-0bf43848adb00922122b0a0eed2fa0318bde8317.zip
frameworks_av-0bf43848adb00922122b0a0eed2fa0318bde8317.tar.gz
frameworks_av-0bf43848adb00922122b0a0eed2fa0318bde8317.tar.bz2
Fixed memory leakage in the DRM framework
Change-Id: Ib1276bec6cafb4e94f8f13b52e50e4987765eec4
Diffstat (limited to 'drm/libdrmframework')
-rw-r--r--drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp b/drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp
index fa659fd..084e323 100644
--- a/drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp
+++ b/drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp
@@ -65,10 +65,11 @@ DrmConstraints* DrmPassthruPlugIn::onGetConstraints(
char* charValue = NULL;
charValue = new char[value.length() + 1];
strncpy(charValue, value.string(), value.length());
+ charValue[value.length()] = '\0';
//Just add dummy available time for verification
drmConstraints->put(&(DrmConstraints::LICENSE_AVAILABLE_TIME), charValue);
-
+ delete[] charValue;
return drmConstraints;
}