X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-hreq.c;h=389a67e2ebd48d94c8d1caf2f2f397fe4463b1dc;hb=1d24a50bda149604760cdc1fd53f65b988c61f0c;hp=fe5af73acb4bbe791f878f96198496cafef561de;hpb=a8e971702f23ee67e02b4716ad4159f12cefdca6;p=src%2Fapp-framework-binder.git diff --git a/src/afb-hreq.c b/src/afb-hreq.c index fe5af73a..389a67e2 100644 --- a/src/afb-hreq.c +++ b/src/afb-hreq.c @@ -39,6 +39,7 @@ #include "afb-hreq.h" #include "afb-subcall.h" #include "afb-session.h" +#include "afb-cred.h" #include "verbose.h" #include "locale-root.h" @@ -319,6 +320,7 @@ static void req_destroy(struct afb_xreq *xreq) json_object_put(hreq->json); free((char*)hreq->xreq.api); free((char*)hreq->xreq.verb); + afb_cred_unref(hreq->xreq.cred); free(hreq); } @@ -981,6 +983,7 @@ struct afb_hreq *afb_hreq_create() if (hreq) { /* init the request */ afb_xreq_init(&hreq->xreq, &afb_hreq_xreq_query_itf); + hreq->xreq.cred = afb_cred_current(); hreq->reqid = ++global_reqids; } return hreq;