Browse Source

Merge commit '55dfaa3' into bfgminer

Conflicts:
	api.c
Luke Dashjr 12 years ago
parent
commit
cb6a28ef47
1 changed files with 3 additions and 3 deletions
  1. 3 3
      api.c

+ 3 - 3
api.c

@@ -3871,14 +3871,14 @@ void api(int api_thr_id)
 
 	SOCKETTYPE *apisock;
 
-	apisock = malloc(sizeof(*apisock));
-	*apisock = INVSOCK;
-
 	if (!opt_api_listen) {
 		applog(LOG_DEBUG, "API not running%s", UNAVAILABLE);
 		return;
 	}
 
+	apisock = malloc(sizeof(*apisock));
+	*apisock = INVSOCK;
+
 	rpc_io_data =
 	io_data = sock_io_new();