Set nullptr to the data of channel object 76/317876/1
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 20 Sep 2024 02:24:00 +0000 (11:24 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Fri, 20 Sep 2024 02:24:00 +0000 (11:24 +0900)
To prevent using invalid data, this patch sets the nullptr to the data
of the channel object.

Change-Id: I22830f5ceaea8d9f0918c8caef5aa5c828c632c1
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/tizen-core/stub_channel.cc

index 33eab672b948efcb512a778b0073c9e33d98354e..409ae25380fc63c1045b79315ab1b6e5a405aaf5 100644 (file)
@@ -151,6 +151,7 @@ API int tizen_core_channel_object_create(tizen_core_channel_object_h* object) {
     return TIZEN_CORE_ERROR_OUT_OF_MEMORY;  // LCOV_EXCL_LINE
   }
 
+  channel_object->SetData(nullptr);
   *object = static_cast<tizen_core_channel_object_h>(channel_object);
   return TIZEN_CORE_ERROR_NONE;
 }