if (!ai)
return AUTOFILL_ERROR_INVALID_PARAMETER;
- if (ai->app_id)
+ if (ai->app_id) {
free(ai->app_id);
+ ai->app_id = NULL;
+ }
- if (ai->service_name)
+ if (ai->service_name) {
free(ai->service_name);
+ ai->service_name = NULL;
+ }
- if (ai->service_message)
+ if (ai->service_message) {
free(ai->service_message);
+ ai->service_message = NULL;
+ }
- if (ai->service_logo_image_path)
+ if (ai->service_logo_image_path) {
free(ai->service_logo_image_path);
+ ai->service_logo_image_path = NULL;
+ }
free(ai);
if (!h)
return AUTOFILL_ERROR_INVALID_PARAMETER;
- if (h->view_id)
+ if (h->view_id) {
free(h->view_id);
+ h->view_id = NULL;
+ }
// Release memory autofill fill response item list
autofill_fill_response_group_h it_h;
if (!it)
return AUTOFILL_ERROR_INVALID_PARAMETER;
- if (it->id)
+ if (it->id) {
free(it->id);
+ it->id = NULL;
+ }
- if (it->value)
+ if (it->value) {
free(it->value);
+ it->value = NULL;
+ }
- if (it->presentation_text)
+ if (it->presentation_text) {
free(it->presentation_text);
+ it->presentation_text = NULL;
+ }
free(it);
if (!it)
return AUTOFILL_ERROR_INVALID_PARAMETER;
- if (it->id)
+ if (it->id) {
free(it->id);
+ it->id = NULL;
+ }
- if (it->label)
+ if (it->label) {
free(it->label);
+ it->label = NULL;
+ }
- if (it->value)
+ if (it->value) {
free(it->value);
+ it->value = NULL;
+ }
free(it);
if (!it)
return AUTOFILL_ERROR_INVALID_PARAMETER;
- if (it->id)
+ if (it->id) {
free(it->id);
+ it->id = NULL;
+ }
- if (it->label)
+ if (it->label) {
free(it->label);
+ it->label = NULL;
+ }
- if (it->value)
+ if (it->value) {
free(it->value);
+ it->value = NULL;
+ }
free(it);
if (!vi)
return AUTOFILL_ERROR_INVALID_PARAMETER;
- if (vi->app_id)
+ if (vi->app_id) {
free(vi->app_id);
+ vi->app_id = NULL;
+ }
- if (vi->view_id)
+ if (vi->view_id) {
free(vi->view_id);
+ vi->view_id = NULL;
+ }
// release memory autofill item list
autofill_save_item_h it_h;
if (!vi)
return AUTOFILL_ERROR_INVALID_PARAMETER;
- if (vi->app_id)
+ if (vi->app_id) {
free(vi->app_id);
+ vi->app_id = NULL;
+ }
- if (vi->view_id)
+ if (vi->view_id) {
free(vi->view_id);
+ vi->view_id = NULL;
+ }
// release memory autofill item list
autofill_item_h it_h;