projects
/
project
/
libubox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
blobmsg: accept NULL attr in blobmsg_get_string()
[project/libubox.git]
/
blobmsg.h
diff --git
a/blobmsg.h
b/blobmsg.h
index
7041aca
..
e58f95d
100644
(file)
--- a/
blobmsg.h
+++ b/
blobmsg.h
@@
-214,6
+214,9
@@
static inline uint64_t blobmsg_get_u64(struct blob_attr *attr)
static inline char *blobmsg_get_string(struct blob_attr *attr)
{
+ if (!attr)
+ return NULL;
+
return (char *) blobmsg_data(attr);
}