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

Commit d3e3ae0e authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Jack He
Browse files

packet_fragmenter: fix potential memory leak

Free the buffer when corrupted ISO frame is received

Bug: 203103249
Bug: 150670922
Test: none
Change-Id: I2ff6a015c0ec1734939e633f54b509c1dd7d5679
parent 983005bb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -295,6 +295,7 @@ static void reassemble_and_dispatch_iso(UNUSED_ATTR BT_HDR* packet) {
          ((boundary_flag == HCI_ISO_BF_FIRST_FRAGMENTED_PACKET) &&
           (iso_full_len <= packet->len))) {
        LOG_ERROR("%s corrupted ISO frame", __func__);
        buffer_allocator->free(packet);
        return;
      }