ubusd_proto: fix crash when trying to subscribe to system objects
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
04e21a65ef
commit
fd61773031
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue