From 780d06768522dedaa33d2989c0e701bd99cb3de7 Mon Sep 17 00:00:00 2001 From: zhuhan Date: Fri, 17 Feb 2023 10:48:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E5=85=A8=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhuhan Change-Id: Ib73c347a66ab38a7af7f2ced6f7e00a2a572ebcd --- .../example/entry/src/main/cpp/main_ability_slice.cpp | 1 - frameworks/want_lite/src/want.cpp | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frameworks/ability_lite/example/entry/src/main/cpp/main_ability_slice.cpp b/frameworks/ability_lite/example/entry/src/main/cpp/main_ability_slice.cpp index cf0ef2a..9957aa4 100644 --- a/frameworks/ability_lite/example/entry/src/main/cpp/main_ability_slice.cpp +++ b/frameworks/ability_lite/example/entry/src/main/cpp/main_ability_slice.cpp @@ -38,7 +38,6 @@ constexpr static uint8_t FONT_ID = 10; int32_t IpcMsgHandler(int funcId, ElementName *elementName, SvcIdentity *serviceSid, void *storeArg) { - printf("IpcMsgHandler, funcId is %d, serviceSid is %p\n", funcId, serviceSid); printf("elementName is %s, %s\n", elementName->bundleName, elementName->abilityName); if (serviceSid == nullptr) { return 0; diff --git a/frameworks/want_lite/src/want.cpp b/frameworks/want_lite/src/want.cpp index ac634fe..cc2bc8c 100644 --- a/frameworks/want_lite/src/want.cpp +++ b/frameworks/want_lite/src/want.cpp @@ -109,6 +109,11 @@ Tlv *EncapTlv(uint8_t type, uint8_t length, const void *value, uint8_t valueLen) } Tlv *newTlv = reinterpret_cast(AdapterMalloc(sizeof(Tlv))); + if (newTlv == nullptr) { + AdapterFree(entity); + return nullptr; + } + newTlv->type = type; newTlv->entity = entity; newTlv->totalLen = totalLen; -- Gitee