]> granicus.if.org Git - esp-idf/commitdiff
ble_mesh: fix canceled buffer memory leak
authorlly <lly@espressif.com>
Mon, 2 Sep 2019 06:55:09 +0000 (14:55 +0800)
committerlly <lly@espressif.com>
Mon, 9 Sep 2019 09:15:16 +0000 (17:15 +0800)
components/bt/esp_ble_mesh/mesh_core/adv.c

index a1c4cf982578106df590f809cebcb7a8c19acbc2..21fd0580c9e566b2d512955edd3f0933e88214aa 100644 (file)
@@ -189,6 +189,8 @@ static void adv_thread(void *p)
                     BT_ERR("%s, xQueueSendToFront failed", __func__);
                 }
             }
+        } else {
+            net_buf_unref(*buf);
         }
 
         /* Give other threads a chance to run */