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

Commit 158c197b authored by Caroline Tice's avatar Caroline Tice
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
parent a72ef28f
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -566,7 +566,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;
    }
@@ -992,4 +992,3 @@ int32_t SampleTable::getCompositionTimeOffset(uint32_t sampleIndex) {
}

}  // namespace android