fix a memory leak
authorJosé Bollo <jose.bollo@iot.bzh>
Wed, 6 Apr 2016 15:28:04 +0000 (17:28 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Wed, 6 Apr 2016 15:28:04 +0000 (17:28 +0200)
Change-Id: I6822dfae11cacc49d14097f4bc43c3da5846b34c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/afb-websock.c

index 797724c..cff995f 100644 (file)
 #include <json.h>
 
 #include <openssl/sha.h>
-/*
-#include <openssl/bio.h>
-#include <openssl/evp.h>
-*/
 
 #include "websock.h"
 
@@ -509,6 +505,7 @@ static void wsreq_reply(struct afb_wsreq *wsreq, int retcode, const char *status
        /* emits the reply */
        message = json_object_to_json_string(reply);
        websock_text(wsreq->aws->ws, message, strlen(message));
+       json_object_put(reply);
 
        /* TODO eliminates the wsreq */
 }