network_allocate(struct uci_map *map, struct uci_sectionmap *sm, struct uci_section *s)
{
struct uci_network *p = malloc(sizeof(struct uci_network));
+ if (!p)
+ return NULL;
memset(p, 0, sizeof(struct uci_network));
return &p->map;
}
INIT_LIST_HEAD(&ifs);
ctx = uci_alloc_context();
+ if (!ctx)
+ return -1;
ucimap_init(&network_map);
if ((argc >= 2) && !strcmp(argv[1], "-s")) {