uci_load() does not guarantee setting passed pointer to NULL on error.
It could result in using uninitialized pointed & crash.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
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" };
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 = {