Commit 9c288a3ac8a8c73c41f9acfc60666879f3bbda3e

Kano 2013-12-22T21:20:44

api.c no decref if not json

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/api.c b/api.c
index 108bda1..bd55c5b 100644
--- a/api.c
+++ b/api.c
@@ -4612,7 +4612,7 @@ void api(int api_thr_id)
 					message(io_data, MSG_INVCMD, 0, NULL, isjson);
 					send_result(io_data, c, isjson);
 				}
-				if (json_is_object(json_config))
+				if (isjson && json_is_object(json_config))
 					json_decref(json_config);
 			}
 		}