projects
/
project
/
procd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Attempt to deal gracefully with allocation failures.
[project/procd.git]
/
system.c
diff --git
a/system.c
b/system.c
index
77111f9
..
82c672e
100644
(file)
--- 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 '\'':