if (b_service_multi_launch)
free(b_service_multi_launch);
+ for (i = 0; i <= NOTIFICATION_EVENT_TYPE_MAX; i++) {
+ if (b_event_handler[i])
+ bundle_free_encoded_rawdata(&b_event_handler[i]);
+ }
+
if (b_text)
free(b_text);
if (b_service_multi_launch)
free(b_service_multi_launch);
+ for (i = 0; i <= NOTIFICATION_EVENT_TYPE_MAX; i++) {
+ if (b_event_handler[i])
+ bundle_free_encoded_rawdata(&b_event_handler[i]);
+ }
+
if (b_text)
free(b_text);
"from noti_list where caller_pkgname = ? and tag = ? and uid = ?", -1, &stmt, NULL);
if (ret != SQLITE_OK) {
NOTIFICATION_ERR("Error: %s\n", sqlite3_errmsg(db));
- return NOTIFICATION_ERROR_OUT_OF_MEMORY;
+ ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
+ goto err;
}
ret = sqlite3_bind_text(stmt, 1, pkgname, -1, SQLITE_TRANSIENT);
"from noti_list where tag = ? and uid = ?", -1, &stmt, NULL);
if (ret != SQLITE_OK) {
NOTIFICATION_ERR("Error: %s\n", sqlite3_errmsg(db));
- return NOTIFICATION_ERROR_OUT_OF_MEMORY;
+ ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
+ goto err;
}
ret = sqlite3_bind_text(stmt, 1, tag, -1, SQLITE_TRANSIENT);
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
- db = notification_db_open(DBPATH);
- if (!db)
- return get_last_result();
-
if (_is_allowed_to_notify(noti) == false) {
NOTIFICATION_DBG("[%s] is not allowed to notify", noti->caller_pkgname);
return NOTIFICATION_ERROR_PERMISSION_DENIED;
NOTIFICATION_DBG("notification display applist - pkgname [%s], applist [%d]", noti->caller_pkgname, noti->display_applist);
}
+ db = notification_db_open(DBPATH);
+ if (!db)
+ return get_last_result();
+
/* Check private ID is exist */
ret = _notification_noti_check_priv_id(noti, db);
if (ret != NOTIFICATION_ERROR_ALREADY_EXIST_ID) {
else
result = 0;
- sqlite3_finalize(stmt);
/* If result > 0, there is priv_id in DB */
if (result > 0) {
}
err:
+ if (stmt != NULL)
+ sqlite3_finalize(stmt);
if (db)
notification_db_close(&db);
*count = result;
- sqlite3_finalize(stmt);
err:
+ if (stmt != NULL)
+ sqlite3_finalize(stmt);
if (db)
notification_db_close(&db);
if (b_service_multi_launch)
free(b_service_multi_launch);
+ for (i = 0; i <= NOTIFICATION_EVENT_TYPE_MAX; i++) {
+ if (b_event_handler[i])
+ bundle_free_encoded_rawdata(&b_event_handler[i]);
+ }
+
if (b_text)
free(b_text);