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

Commit 37c428cd authored by Caroline Tice's avatar Caroline Tice Committed by Lajos Molnar
Browse files

Fix 'potential memory leak' compiler warning.

This CL fixes the following compiler warning:

frameworks/av/media/libstagefright/SampleTable.cpp:569:9: warning:
 Memory allocated by 'new[]' should be deallocated by 'delete[]', not
 'delete'.

Bug: 33137046
Test: Compiled with change; no warning generated.

Change-Id: I29abd90e02bf482fa840d1f7206ebbdacf7dfa37
(cherry picked from commit 158c197b)
parent 920df6ca
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -561,7 +561,7 @@ status_t SampleTable::setSyncSampleParams(off64_t data_offset, size_t data_size)

    if (mDataSource->readAt(data_offset + 8, mSyncSamples,
            (size_t)allocSize) != (ssize_t)allocSize) {
        delete mSyncSamples;
        delete[] mSyncSamples;
        mSyncSamples = NULL;
        return ERROR_IO;
    }
@@ -987,4 +987,3 @@ int32_t SampleTable::getCompositionTimeOffset(uint32_t sampleIndex) {
}

}  // namespace android