Browse Source

Merge branch 'bugfix_jsonrpc_leak' into bfgminer-2.8.x

Luke Dashjr 13 years ago
parent
commit
f9a218dd4c
1 changed files with 3 additions and 1 deletions
  1. 3 1
      api.c

+ 3 - 1
api.c

@@ -3603,7 +3603,6 @@ void api(int api_thr_id)
 							}
 						}
 					}
-					json_decref(json_config);
 				}
 
 				if (!did)
@@ -3623,6 +3622,9 @@ void api(int api_thr_id)
 						}
 					}
 
+				if (isjson)
+					json_decref(json_config);
+
 				if (!did) {
 					strcpy(io_buffer, message(MSG_INVCMD, 0, NULL, isjson));
 					send_result(c, isjson);