X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fubus.git;a=blobdiff_plain;f=ubusd_obj.c;h=62c2331c50aba30be8258ffbcb53816f773a8a67;hp=8923821e0827fe3fb904ae57e212ed7cc33f0016;hb=df0292c3af36441dce81b30ac4cd847326e27196;hpb=4d1cdc55274aac9d032e3ae4bbf0ab72336ba9ac diff --git a/ubusd_obj.c b/ubusd_obj.c index 8923821..62c2331 100644 --- a/ubusd_obj.c +++ b/ubusd_obj.c @@ -58,6 +58,9 @@ static struct ubus_object_type *ubus_create_obj_type(struct blob_attr *sig) int rem; type = calloc(1, sizeof(*type)); + if (!type) + return NULL; + type->refcount = 1; if (!ubus_alloc_id(&obj_types, &type->id, 0))