summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2016-11-20 16:40:06 +0100
committerFelix Fietkau <nbd@nbd.name>2016-11-20 16:40:06 +0100
commitfd61773031402728098800c67f38f83ee04977ad (patch)
tree07a71b256714f8e3afbf80b8f5bc7a85cad1ab93
parent04e21a65ef6489be1cf3882a67a81b181dc710b5 (diff)
downloadubus-fd61773031402728098800c67f38f83ee04977ad.tar.gz
ubusd_proto: fix crash when trying to subscribe to system objects
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--ubusd_proto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ubusd_proto.c b/ubusd_proto.c
index 53e507a..b591384 100644
--- 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)