projects
/
project
/
ubus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
ubusd_proto: fix crash when trying to subscribe to system objects
[project/ubus.git]
/
ubusd_proto.c
diff --git
a/ubusd_proto.c
b/ubusd_proto.c
index
53e507a
..
b591384
100644
(file)
--- a/
ubusd_proto.c
+++ b/
ubusd_proto.c
@@
-377,7
+377,7
@@
static int ubusd_handle_add_watch(struct ubus_client *cl, struct ubus_msg_buf *u
return UBUS_STATUS_INVALID_ARGUMENT;
target = ubusd_find_object(blob_get_u32(attr[UBUS_ATTR_TARGET]));
- if (!target)
+ if (!target
|| !target->client
)
return UBUS_STATUS_NOT_FOUND;
if (cl == target->client)