瀏覽代碼

Merge pull request #1074 from monkey/duda

Duda: delete JSON tree context after format
Hamilton Turner 11 年之前
父節點
當前提交
703c1e0220
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      frameworks/C/duda/webservice/main.c

+ 3 - 0
frameworks/C/duda/webservice/main.c

@@ -42,6 +42,9 @@ void cb_json(duda_request_t *dr)
     body = json->print_unformatted_gc(dr, j_root);
     body_len = strlen(body);
 
+    /* Delete the JSON tree */
+    json->delete(j_root);
+
     /* Compose the response */
     response->http_status(dr, 200);
     response->http_header_n(dr, JSON_CONTENT_TYPE, sizeof(JSON_CONTENT_TYPE) - 1);