X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-ws-json1.c;fp=src%2Fafb-ws-json1.c;h=4e405715d2d4ea1a39a3063cadf2fa973061b0b2;hb=a138fda9841c46e28de93e32aee62956e26556b1;hp=60a0a8016d15aeabd0cc1475df12759aa750ec6b;hpb=09010fa0093bee944738b728bf3277961d9bd6d7;p=src%2Fapp-framework-binder.git diff --git a/src/afb-ws-json1.c b/src/afb-ws-json1.c index 60a0a801..4e405715 100644 --- a/src/afb-ws-json1.c +++ b/src/afb-ws-json1.c @@ -192,6 +192,7 @@ static void aws_on_call(struct afb_ws_json1 *ws, const char *api, const char *ve /* fill and record the request */ afb_wsj1_msg_addref(msg); wsreq->msgj1 = msg; + wsreq->xreq.cred = afb_cred_addref(ws->cred); wsreq->xreq.api = api; wsreq->xreq.verb = verb; wsreq->xreq.json = afb_wsj1_msg_object_j(wsreq->msgj1); @@ -222,6 +223,7 @@ static void wsreq_destroy(struct afb_xreq *xreq) afb_context_disconnect(&wsreq->xreq.context); afb_wsj1_msg_unref(wsreq->msgj1); + afb_cred_unref(wsreq->xreq.cred); aws_unref(wsreq->aws); free(wsreq); }