ubus: fix crash caused by missing static keyword
authorFelix Fietkau <nbd@nbd.name>
Mon, 8 Nov 2021 21:12:05 +0000 (22:12 +0100)
committerFelix Fietkau <nbd@nbd.name>
Mon, 8 Nov 2021 21:12:05 +0000 (22:12 +0100)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
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
        };