better cleanup on error
authorJosé Bollo <jose.bollo@iot.bzh>
Mon, 9 May 2016 12:15:23 +0000 (14:15 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Mon, 9 May 2016 12:15:23 +0000 (14:15 +0200)
Change-Id: Icb78637f4e7ed905ae8df4bf2e1ba1e0d176dfa2
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/afb-ws-json.c

index 4393d09..4bdda7e 100644 (file)
@@ -90,7 +90,7 @@ struct afb_ws_json *afb_ws_json_create(int fd, struct AFB_clientCtx *context, vo
        return result;
 
 error5:
-       /* TODO */
+       afb_ws_destroy(result->ws);
 error4:
        json_tokener_free(result->tokener);
 error3: