Ticket #13186: 0040-h2generic.cpp-fix-use-after-free.patch

File 0040-h2generic.cpp-fix-use-after-free.patch, 787 bytes (added by mt, 3 years ago)
  • src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2generic.cpp

    From a7b9264633292a6792415b805b203ff5a23291b0 Mon Sep 17 00:00:00 2001
    From: Murai Takashi <tmurai01@gmail.com>
    Date: Mon, 9 Jan 2017 05:38:38 +0900
    Subject: [PATCH 40/40] h2generic.cpp: fix use after free.
    
    ---
     src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2generic.cpp | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2generic.cpp b/src/add-ons/kernel/drivers/bluetooth/h2/h2generic/h2generic.cpp
    index 9dad099..d0d6b2f 100644
    a b bail1:  
    149149    delete_sem(new_bt_dev->cmd_complete);
    150150bail0:
    151151    free(new_bt_dev);
     152    new_bt_dev = NULL;
    152153exit:
    153154    return new_bt_dev;
    154155}