X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-api-so-v3.c;h=373386ef17ba8dad607f4e374c6a58a0a7096a82;hb=de0527f7cf5b4a4278698ab034a332cf75723300;hp=415c13d992739994c4d93dfd536b3082c1b1b084;hpb=4521c1e7ae5371ab9d639adc617d17fb4e8ded0c;p=src%2Fapp-framework-binder.git diff --git a/src/afb-api-so-v3.c b/src/afb-api-so-v3.c index 415c13d9..373386ef 100644 --- a/src/afb-api-so-v3.c +++ b/src/afb-api-so-v3.c @@ -59,7 +59,7 @@ static int init(void *closure, struct afb_api_x3 *api) } if (rc >= 0 && a->entry) - rc = a->entry(api); + rc = afb_api_v3_safe_preinit(api, a->entry); if (rc >= 0) afb_api_x3_seal(api); @@ -105,7 +105,7 @@ int afb_api_so_v3_add(const char *path, void *handle, struct afb_apiset *declare goto error; } - api = afb_api_v3_create(declare_set, call_set, a.desc->api, a.desc->info, a.desc->noconcurrency, init, &a, 0); + api = afb_api_v3_create(declare_set, call_set, a.desc->api, a.desc->info, a.desc->noconcurrency, init, &a, 0, NULL, path); if (api) return 1; } else { @@ -116,8 +116,10 @@ int afb_api_so_v3_add(const char *path, void *handle, struct afb_apiset *declare } export = afb_export_create_none_for_path(declare_set, call_set, path, init, &a); - if (export) + if (export) { + afb_export_unref(export); return 1; + } } ERROR("binding [%s] initialisation failed", path);