ubus: fix crash caused by missing static keyword
[project/qosify.git] / ubus.c
diff --git a/ubus.c b/ubus.c
index 088fb145b37629e88626bc44e891b904bef2ebfb..d9b03cf727974d8751ca9cccc3e44629511ef5ad 100644 (file)
--- a/ubus.c
+++ b/ubus.c
@@ -397,7 +397,7 @@ qosify_ubus_event_cb(struct ubus_context *ctx, struct ubus_event_handler *ev,
 static void
 ubus_connect_handler(struct ubus_context *ctx)
 {
-       struct ubus_event_handler ev = {
+       static struct ubus_event_handler ev = {
                .cb = qosify_ubus_event_cb
        };