if (!handle->send_error_cb) {
LOGE("Out of memory");
free(handle->app_id);
+ rpc_port_AutofillSvcPort_autofill_svc_auth_info_cb_destroy(handle->auth_info_cb);
+ rpc_port_AutofillSvcPort_autofill_svc_fill_response_cb_destroy(handle->fill_response_received_cb);
free(handle);
return NULL;
}
if (!handle)
return;
- if (handle->auth_info_cb)
+ if (handle->auth_info_cb) {
rpc_port_AutofillSvcPort_autofill_svc_auth_info_cb_destroy(handle->auth_info_cb);
+ handle->auth_info_cb = NULL;
+ }
- if (handle->fill_response_received_cb)
+ if (handle->fill_response_received_cb) {
rpc_port_AutofillSvcPort_autofill_svc_fill_response_cb_destroy(handle->fill_response_received_cb);
+ handle->fill_response_received_cb = NULL;
+ }
- if (handle->send_error_cb)
+ if (handle->send_error_cb) {
rpc_port_AutofillSvcPort_autofill_svc_send_error_cb_destroy(handle->send_error_cb);
+ handle->send_error_cb = NULL;
+ }
- if (handle->app_id)
+ if (handle->app_id) {
free(handle->app_id);
+ handle->app_id = NULL;
+ }
free(handle);
}