From 8333a9be57d75197075ccf2bb418e5ac402a8ae2 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Thu, 20 Jun 2019 12:18:38 +0200 Subject: [PATCH] fix dtor of PHY when stack init fails --- srsue/hdr/phy/phy.h | 2 +- srsue/hdr/ue.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/srsue/hdr/phy/phy.h b/srsue/hdr/phy/phy.h index 3ffdc61f7..6cf6dcd1f 100644 --- a/srsue/hdr/phy/phy.h +++ b/srsue/hdr/phy/phy.h @@ -43,7 +43,7 @@ class phy : public ue_lte_phy_base, public thread { public: phy() : workers_pool(MAX_WORKERS), common(MAX_WORKERS), thread("PHY"){}; - ~phy() override = default; + ~phy() { stop(); } // Init defined in base class int init(const phy_args_t& args_, srslte::logger* logger_) final; diff --git a/srsue/hdr/ue.h b/srsue/hdr/ue.h index 2c4967e8c..34973a31b 100644 --- a/srsue/hdr/ue.h +++ b/srsue/hdr/ue.h @@ -108,8 +108,8 @@ public: private: // UE consists of a radio, a PHY and a stack element - std::unique_ptr radio; std::unique_ptr phy; + std::unique_ptr radio; std::unique_ptr stack; std::unique_ptr gw_inst;