Fix wrong bundle free. 04/262204/3
authorChanggyu Choi <changyu.choi@samsung.com>
Wed, 4 Aug 2021 07:03:00 +0000 (16:03 +0900)
committerChanggyu Choi <changyu.choi@samsung.com>
Wed, 4 Aug 2021 07:13:45 +0000 (16:13 +0900)
TIDL c++ codes not copy bundle, when construct Bundle with "Bundle(bundle*)".
So bundle* shouldn't be freed after using "Bundle(bundle*)"

Change-Id: I9a0e9774bf897086081837e168560d389fa7c71f
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
idlc/gen/cpp_gen_base.cc

index e05aee0..f901eaf 100644 (file)
@@ -577,8 +577,7 @@ std::string CppGeneratorBase::ConvertTypeToDeserializer(
     if (make_new_type) {
       ret += "Bundle " + id + "(" + id + "_raw);\n";
     } else {
-      ret +=  id + " = " + id + "_raw;\n"
-          + "bundle_free(" + id + "_raw);\n";
+      ret +=  id + " = " + id + "_raw;\n";
     }
   } else if (type.GetMetaType() != nullptr || type.IsUserDefinedType()) {
     std::string n;