int complication_id;
char* context_raw = NULL;
int type;
- Bundle* context_data;
- Bundle* shared_data;
bool ret;
bool is_valid;
char num_str[32] = {0, };
LOGI("get : %s, %d, %d", sender_app_id, complication_id, type);
+ Bundle* context_data = nullptr;
+ Bundle* shared_data = nullptr;
try {
context_data = new Bundle(std::string(context_raw));
shared_data = new Bundle();
} catch (const std::bad_alloc &ba) {
LOGE("Bundle::Exception bad_alloc");
+ if (context_data != nullptr)
+ delete context_data;
return;
} catch (Exception &ex) {
LOGE("%s %d", ex.what(), ex.GetErrorCode());
+ if (context_data != nullptr)
+ delete context_data;
return;
}