luci2: initialize package pointers to NULL
[project/luci2/ui.git] / luci2 / src / rpcd / luci2.c
index c8ef9bf370d22be3b65ddd406cf5fed6d8a75ef3..7c37144b595340ee8edc3da0cf8398cfbd2fd539 100644 (file)
@@ -217,7 +217,7 @@ rpc_luci2_system_log(struct ubus_context *ctx, struct ubus_object *obj,
        int logsize = 0;
        const char *logfile = NULL;
        struct stat st;
-       struct uci_package *p;
+       struct uci_package *p = NULL;
        struct uci_element *e;
        struct uci_section *s;
        struct uci_ptr ptr = { .package = "system" };
@@ -1235,7 +1235,7 @@ static FILE *
 dnsmasq_leasefile(void)
 {
        FILE *leases = NULL;
-       struct uci_package *p;
+       struct uci_package *p = NULL;
        struct uci_element *e;
        struct uci_section *s;
        struct uci_ptr ptr = {