Browse Source

SGW: Initialise user variable to NULL to avoid potential mis-free on error conditions

Luke Dashjr 12 years ago
parent
commit
3f0155c074
1 changed files with 1 additions and 1 deletions
  1. 1 1
      driver-getwork.c

+ 1 - 1
driver-getwork.c

@@ -132,7 +132,7 @@ int handle_getwork(struct MHD_Connection *conn, bytes_t *upbuf)
 	static bool _init = false, b;
 	struct getwork_client *client;
 	struct MHD_Response *resp;
-	char *user, *idstr = NULL;
+	char *user = NULL, *idstr = NULL;
 	const char *submit = NULL;
 	size_t idstr_sz = 1;
 	struct cgpu_info *cgpu;