}
struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs));
- setting_retm_if(cbs == NULL, "calloc failed");
+ if (!cbs) {
+ service_destroy(service);
+ return;
+ }
cbs->layout_cb = setting_display_layout_ug_cb;
cbs->result_cb = __setting_display_wallpaper_imageviewer_ug_result_cb;