OSDN Git Service

MtpDatabase JNI: Fixed a memory-leak in getObjectPropertyValue().
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Sat, 31 May 2014 13:50:38 +0000 (15:50 +0200)
committerMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Sat, 31 May 2014 14:17:11 +0000 (16:17 +0200)
commit17a24c58bb2e86719f003c80f682beb66803f24d
tree0ed75f8f4ed1d31efd4df272715a82ac481f8190
parent4f8785f28e6305d427cc3e483248828c9b9b06a2
MtpDatabase JNI: Fixed a memory-leak in getObjectPropertyValue().

The jstring "stringValue" was not never freed.
In the case where "str" was NULL the whole cleanup part (see "goto out")
was even skipped.
This patch makes getObjectPropertyValue() behave like
getObjectPropertyList().

Change-Id: I5a7ec3611036f5253a054b00064999bcd1d1c29e
media/jni/android_mtp_MtpDatabase.cpp