projects
/
oweals
/
ubus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
libubus: check for non-NULL data before running callbacks
[oweals/ubus.git]
/
libubus-req.c
diff --git
a/libubus-req.c
b/libubus-req.c
index 92f80fa7f75e844909999a0e0cf82ae1663c94d9..4eda383e90e850259fdc86e459d48f46f307d086 100644
(file)
--- a/
libubus-req.c
+++ b/
libubus-req.c
@@
-32,6
+32,9
@@
static void req_data_cb(struct ubus_request *req, int type, struct blob_attr *da
return;
attr = ubus_parse_msg(data);
+ if (!attr[UBUS_ATTR_DATA])
+ return;
+
req->data_cb(req, type, attr[UBUS_ATTR_DATA]);
}