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

Commit 230e0e64 authored by Vic Yang's avatar Vic Yang Committed by android-build-merger
Browse files

Merge "Fix memory leak in String16" am: 9a661615

am: 73ac1266

Change-Id: I7205e6cd4e0b9f4dfc3067c77ffb7510a1577164
parents 31e84d00 73ac1266
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -346,7 +346,6 @@ void* String16::edit() {
    if (isStaticString()) {
        buf = static_cast<SharedBuffer*>(alloc((size() + 1) * sizeof(char16_t)));
        if (buf) {
            buf->acquire();
            memcpy(buf->data(), mString, (size() + 1) * sizeof(char16_t));
        }
    } else {
@@ -365,7 +364,6 @@ void* String16::editResize(size_t newSize) {
        }
        buf = static_cast<SharedBuffer*>(alloc(newSize));
        if (buf) {
            buf->acquire();
            memcpy(buf->data(), mString, copySize);
        }
    } else {