X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=ucimap.c;h=6a5c11721bbc79e192d22785e8ce1c7997bdc342;hp=16ce56ad56f95b285dae58ed579928d1d58f7f98;hb=ef95525edc1ade7e729187b011de889b8f5f57c6;hpb=2b86a11e49aa14d24c1e85ff5a7bd5ce58565df6 diff --git a/ucimap.c b/ucimap.c index 16ce56a..6a5c117 100644 --- a/ucimap.c +++ b/ucimap.c @@ -275,6 +275,8 @@ ucimap_resize_list(struct ucimap_section_data *sd, struct ucimap_list **list, in if (!*list) { new = calloc(1, size); + if (!new) + return -ENOMEM; ucimap_add_alloc(sd, new); goto set;