Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'blobmsg.c')
-rw-r--r--blobmsg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/blobmsg.c b/blobmsg.c
index a2c2c5d..9fe96e4 100644
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -220,6 +220,8 @@ blobmsg_open_nested(struct blob_buf *buf, const char *name, bool array)
name = "";
head = blobmsg_new(buf, type, name, 0, &data);
+ if (!head)
+ return NULL;
blob_set_raw_len(buf->head, blob_pad_len(buf->head) - blobmsg_hdrlen(strlen(name)));
buf->head = head;
return (void *)offset;