diff --git a/frameworks/want_lite/src/want.cpp b/frameworks/want_lite/src/want.cpp index a42a406390397606e512c51af66075aeac09c5e6..09c9c6d2edd75886f113e05632b95a7db47e1ad1 100644 --- a/frameworks/want_lite/src/want.cpp +++ b/frameworks/want_lite/src/want.cpp @@ -71,6 +71,10 @@ void ClearWant(Want *want) #endif AdapterFree(want->appPath); AdapterFree(want->data); +#ifndef OHOS_APPEXECFWK_BMS_BUNDLEMANAGER + AdapterFree(want->actions); + AdapterFree(want->entities); +#endif } bool SetWantElement(Want *want, ElementName element) diff --git a/interfaces/kits/want_lite/want.h b/interfaces/kits/want_lite/want.h index aba1ba53686da435aa65a2199d9eae169087dc29..719c1cf5829c8febe3aee5baacf0a9abf9c2db5a 100644 --- a/interfaces/kits/want_lite/want.h +++ b/interfaces/kits/want_lite/want.h @@ -79,6 +79,10 @@ typedef struct { const char *appPath; uint32_t mission; +#ifndef OHOS_APPEXECFWK_BMS_BUNDLEMANAGER + char *actions; + char *entities; +#endif } Want; #ifdef __cplusplus diff --git a/services/abilitymgr_lite/src/slite/bms_helper.cpp b/services/abilitymgr_lite/src/slite/bms_helper.cpp index 71b8b82cea57165f54d4d0862417757d0299bfcb..47dd9c5b13155d32a511f483a814cb8a05bc08b5 100644 --- a/services/abilitymgr_lite/src/slite/bms_helper.cpp +++ b/services/abilitymgr_lite/src/slite/bms_helper.cpp @@ -136,6 +136,7 @@ uint8_t BMSHelper::QueryAbilitySvcInfo(const Want *want, AbilitySvcInfo *svcInfo } AbilityInfo abilityInfo = { nullptr, nullptr }; + memset_s(&abilityInfo, sizeof(AbilityInfo), 0, sizeof(AbilityInfo)); QueryAbilityInfo(want, &abilityInfo); if (!IsValidAbility(&abilityInfo)) { APP_ERRCODE_EXTRA(EXCE_ACE_APP_START, EXCE_ACE_APP_START_UNKNOWN_BUNDLE_INFO);