summaryrefslogtreecommitdiffstats
path: root/system.c
diff options
context:
space:
mode:
Diffstat (limited to 'system.c')
-rw-r--r--system.c5
1 files changed, 5 insertions, 0 deletions
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 '\'':