Fix issue from static analysis 53/256653/1
authorTomasz Swierczek <t.swierczek@samsung.com>
Thu, 8 Apr 2021 12:39:19 +0000 (14:39 +0200)
committerTomasz Swierczek <t.swierczek@samsung.com>
Thu, 8 Apr 2021 12:39:19 +0000 (14:39 +0200)
The ChannelCreator::closeAll(), when called in copy constructor,
may operate on uninitialized data.

Change-Id: Iaec6b3edc7e685ce14f7ea8e4d94eb3f59c9f4b7

src/common/channel.cpp

index c6323c3fa8f2bc6619f55e5dfb2a84cbae01946a..48f76887325ee38591dc05a769a5ad33dfd8255b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2020 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2017-2021 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * This file is licensed under the terms of MIT License or the Apache License
  * Version 2.0 of your choice. See the LICENSE.MIT file for MIT license details.
@@ -132,8 +132,6 @@ ChannelCreator::ChannelCreator(ChannelCreator &&second)
     if (this == &second)
         return;
 
-    closeAll();
-
     m_parent[0] = second.m_parent[0];
     m_parent[1] = second.m_parent[1];
     m_child[0] = second.m_child[0];