X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fubus.git;a=blobdiff_plain;f=libubus.c;h=e42f14f9cdf026a3dea36beeb45d60557cb717b9;hp=be4e6acdd797480225631b45d70e27909bbe0bcb;hb=73cbb94b4808ac86e686ef80ff4af9b4b84945bd;hpb=6280cbaf0966928c4f83b925fb5b94c3ecb1936e diff --git a/libubus.c b/libubus.c index be4e6ac..e42f14f 100644 --- a/libubus.c +++ b/libubus.c @@ -243,8 +243,11 @@ int ubus_register_event_handler(struct ubus_context *ctx, if (pattern) blobmsg_add_string(&b2, "pattern", pattern); - return ubus_invoke(ctx, UBUS_SYSTEM_OBJECT_EVENT, "register", b2.head, + ret = ubus_invoke(ctx, UBUS_SYSTEM_OBJECT_EVENT, "register", b2.head, NULL, NULL, 0); + blob_buf_free(&b2); + + return ret; } int ubus_send_event(struct ubus_context *ctx, const char *id,