if (!obj_type)
return NULL;
- asprintf((char **)&obj_type->name, "luci-rpc-plugin-%s", name);
+ if (asprintf((char **)&obj_type->name, "luci-rpc-plugin-%s", name) < 0)
+ return NULL;
+
obj_type->methods = methods;
obj_type->n_methods = n_method;
struct rpc_plugin *p;
void *dlh;
- dlh = dlopen(path, RTLD_LAZY | RTLD_GLOBAL);
+ dlh = dlopen(path, RTLD_LAZY | RTLD_LOCAL);
if (!dlh)
return UBUS_STATUS_UNKNOWN_ERROR;