switch (event) {
case AE_RESET:
_DBG("[APP %d] RESET", _pid);
+ if (ui->pending_data)
+ bundle_free(ui->pending_data);
ui->pending_data = bundle_dup(b);
LOG(LOG_DEBUG, "LAUNCH", "[%s:Application:reset:start]", ui->name);
static int __set_i18n(const char *domain, const char *dir)
{
char *r;
+ char *lan;
if (domain == NULL) {
errno = EINVAL;
r = setlocale(LC_ALL, "");
/* if locale is not set properly, try again to set as language base */
if (r == NULL) {
- r = setlocale(LC_ALL, vconf_get_str(VCONFKEY_LANGSET));
- _DBG("*****appcore setlocale=%s\n", r);
+ lan = vconf_get_str(VCONFKEY_LANGSET);
+ if (lan != NULL) {
+ r = setlocale(LC_ALL, lan);
+ _DBG("*****appcore setlocale=%s\n", r);
+ free(lan);
+ }
}
if (r == NULL)
_ERR("appcore: setlocale() error");