X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-ws-json1.c;h=85dc02590030bf72218ae3b5f26a66b1e8900139;hb=e52a48e88d80303e8d857f6757e60a5839d64e0f;hp=67ce2d8e8b9e5c5cbc89cd146cf8a2aa540a690c;hpb=dde7d32db7ac1f784e84e79d33442558a7c21d41;p=src%2Fapp-framework-binder.git diff --git a/src/afb-ws-json1.c b/src/afb-ws-json1.c index 67ce2d8e..85dc0259 100644 --- a/src/afb-ws-json1.c +++ b/src/afb-ws-json1.c @@ -1,5 +1,5 @@ /* - * Copyright 2016 IoT.bzh + * Copyright (C) 2016 "IoT.bzh" * Author: José Bollo * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -29,7 +29,7 @@ #include "afb-ws-json1.h" #include "afb-msg-json.h" #include "session.h" -#include "afb-req-itf.h" +#include #include "afb-apis.h" #include "afb-context.h" @@ -343,7 +343,7 @@ static void wsreq_addref(struct afb_wsreq *wsreq) static void wsreq_unref(struct afb_wsreq *wsreq) { if (--wsreq->refcount == 0) { - struct afb_wsreq **prv = &wsreq->ws->requests; + struct afb_wsreq **prv = &wsreq->aws->requests; while(*prv != NULL) { if (*prv == wsreq) { *prv = wsreq->next; @@ -352,6 +352,7 @@ static void wsreq_unref(struct afb_wsreq *wsreq) prv = &(*prv)->next; } afb_context_disconnect(&wsreq->context); + json_object_put(wsreq->root); free(wsreq->text); free(wsreq); }