X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-api-ws.c;h=3e0b281caf4c54451938787a82c9cf13a6a5a86f;hb=a138fda9841c46e28de93e32aee62956e26556b1;hp=472a44d4fe05f6f76dbdd9ac9e089826e1641e43;hpb=03f863dd080d32f71c4a0755c02e23c72e4cb342;p=src%2Fapp-framework-binder.git diff --git a/src/afb-api-ws.c b/src/afb-api-ws.c index 472a44d4..3e0b281c 100644 --- a/src/afb-api-ws.c +++ b/src/afb-api-ws.c @@ -949,6 +949,7 @@ static void api_ws_server_called(struct api_ws_client *client, struct readbuf *r wreq->xreq.context.flags = flags; /* makes the call */ + wreq->xreq.cred = afb_cred_addref(client->cred); wreq->xreq.api = client->api; wreq->xreq.verb = verb; afb_apis_call(&wreq->xreq); @@ -1074,6 +1075,7 @@ static void api_ws_server_req_destroy_cb(struct afb_xreq *xreq) struct api_ws_server_req *wreq = CONTAINER_OF_XREQ(struct api_ws_server_req, xreq); afb_context_disconnect(&wreq->xreq.context); + afb_cred_unref(wreq->xreq.cred); json_object_put(wreq->xreq.json); free(wreq->rcvdata); api_ws_server_client_unref(wreq->client);