@ -109,8 +109,7 @@ static bool gbt_merkle_bins(gbtbase_t *gbt, json_t *transaction_arr)
len += strlen(txn);
}
gbt->txn_data = ckalloc(len + 1);
gbt->txn_data[len] = '\0';
gbt->txn_data = ckzalloc(len + 1);
for (i = 0; i < gbt->transactions; i++) {
char binswap[32];
@ -375,6 +375,7 @@ int connect_socket(char *url, char *port)
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
memset(&servinfobase, 0, sizeof(struct addrinfo));
servinfo = &servinfobase;
if (getaddrinfo(url, port, &hints, &servinfo) != 0) {
@ -2035,6 +2035,7 @@ static void load_users(ckpool_t *ckp)
LOGDEBUG("Added user %s with %lu shares", instance->username, pplns_shares);
closedir(dp);
int stratifier(proc_instance_t *pi)