diff --git a/media/jni/soundpool/SoundPool.cpp b/media/jni/soundpool/SoundPool.cpp index a8b91d24c5a94..a73209bf19795 100644 --- a/media/jni/soundpool/SoundPool.cpp +++ b/media/jni/soundpool/SoundPool.cpp @@ -484,6 +484,7 @@ static status_t decode(int fd, int64_t offset, int64_t length, status_t err = AMediaExtractor_setDataSourceFd(ex, fd, offset, length); if (err != AMEDIA_OK) { + AMediaExtractor_delete(ex); return err; }