X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=system.c;h=82c672ee4900eb65a93bac1e9e587c0e76c9c8dc;hb=8f33afd87f118bfea52f50f7787843b694a38e72;hp=77111f90cacac7f8d3b0e9a7bb147b7e0117493d;hpb=1791dc06ea8458bb54e723a320b0ee87098ab498;p=project%2Fprocd.git diff --git a/system.c b/system.c index 77111f9..82c672e 100644 --- a/system.c +++ b/system.c @@ -144,6 +144,11 @@ static int system_board(struct ubus_context *ctx, struct ubus_object *obj, continue; dest = blobmsg_alloc_string_buffer(&b, key, strlen(val)); + if (!dest) { + ERROR("Failed to allocate blob.\n"); + continue; + } + while (val && (ch = *(val++)) != 0) { switch (ch) { case '\'':