curl_free(path);
}
- fail:
+fail:
curl_url_cleanup(h); /* free url handle */
return 0;
}
goto cleanup;
}
- cleanup:
+cleanup:
curl_url_cleanup(urlp);
curl_easy_cleanup(curl);
return 0;
as->dst.port = curlx_ultous(dstport);
return as;
- error:
+error:
altsvc_free(as);
return NULL;
}
}
return result;
- fail:
+fail:
Curl_safefree(asi->filename);
free(line);
fclose(fp);
return 1;
- err_exit:
+err_exit:
#ifndef CURL_DISABLE_SOCKETPAIR
if(tsd->sock_pair[0] != CURL_SOCKET_BAD) {
sclose(tsd->sock_pair[0]);
return TRUE;
- err_exit:
+err_exit:
destroy_async_data(asp);
- errno_exit:
+errno_exit:
errno = err;
return FALSE;
}
*outlen = rawlen;
return CURLE_OK;
- bad:
+bad:
free(newstr);
return CURLE_BAD_CONTENT_ENCODING;
}
Curl_safefree(data->state.aptr.userpwd);
Curl_safefree(data->state.aptr.proxyuserpwd);
return CURLE_OK;
- error:
+error:
DEBUGASSERT(result);
if(io)
hyper_io_free(io);
"The cache now contains %zu members",
conn->connection_id, connc->num_conn));
- unlock:
+unlock:
CONNCACHE_UNLOCK(data);
return result;
}
return d;
- fail:
+fail:
freecookie(d);
return NULL;
}
}
return CURLE_OK;
- fail:
+fail:
Curl_safefree(*path);
return CURLE_QUOTE_ERROR;
}
}
}
- error:
+error:
free(eword);
free(path);
return result;
free(nurl);
return CURLE_OK;
- error:
+error:
free(nurl);
Curl_close(&doh);
return result;
#endif
return NULL;
- error:
+error:
curl_slist_free_all(dohp->headers);
data->req.doh->headers = NULL;
for(slot = 0; slot < DOH_PROBE_SLOTS; slot++) {
return CURLE_OK;
- fail:
+fail:
initialized--; /* undo the increase */
return CURLE_FAILED_INIT;
}
return outcurl;
- fail:
+fail:
if(outcurl) {
#ifndef CURL_DISABLE_COOKIES
infof(data, "Wildcard - Parsing started");
return CURLE_OK;
- fail:
+fail:
if(ftpwc) {
Curl_ftp_parselist_data_free(&ftpwc->parser);
free(ftpwc);
hs, &hs->node);
data->state.prevhead = hs;
return CURLE_OK;
- fail:
+fail:
free(hs);
return result;
}
goto err;
error = false;
- err:
+err:
if(error) {
failf(data, "Couldn't parse CURLOPT_RESOLVE entry '%s'",
hostp->data);
unlink(tempstore);
}
free(tempstore);
- skipsave:
+skipsave:
if(data->set.hsts_write) {
/* if there's a write callback */
struct curl_index i; /* count */
}
return result;
- fail:
+fail:
Curl_safefree(h->filename);
fclose(fp);
return CURLE_OUT_OF_MEMORY;
goto fail;
}
- fail:
+fail:
free(out);
return result;
}
goto fail;
}
- fail:
+fail:
return result;
}
uc = curl_url_get(u, CURLUPART_URL, &url, 0);
if(uc)
rc = 4;
- fail:
+fail:
curl_url_cleanup(u);
if(rc)
return rc;
DEBUGF(LOG_CF(data, cf, "Got PUSH_PROMISE, ignore it"));
rv = CURL_PUSH_DENY;
}
- fail:
+fail:
return rv;
}
goto number;
- unsigned_number:
+unsigned_number:
/* Unsigned number of base BASE. */
is_neg = 0;
- number:
+number:
/* Number of base BASE. */
/* Supply a default precision if none was given. */
unsigned char packet;
switch(mqtt->state) {
- MQTT_SUBACK_COMING:
+MQTT_SUBACK_COMING:
case MQTT_SUBACK_COMING:
result = mqtt_verify_suback(data);
if(result)
result = CURLE_WEIRD_SERVER_REPLY;
goto end;
}
- end:
+end:
return result;
}
return multi;
- error:
+error:
sockhash_destroy(&multi->sockhash);
Curl_hash_destroy(&multi->hostcache);
multi_handle_timeout(data, nowp, &stream_error, &result, TRUE);
}
- statemachine_end:
+statemachine_end:
if(data->mstate < MSTATE_COMPLETED) {
if(result) {
}
} /* while Curl_get_line() */
- out:
+out:
if(!retcode) {
/* success */
if(login_alloc) {
}
}
return FALSE; /* not a time string */
- match:
+match:
*h = hh;
*m = mm;
*s = ss;
sclose(listener);
return 0;
- error:
+error:
sclose(listener);
sclose(socks[0]);
sclose(socks[1]);
}
}
/* FALLTHROUGH */
- CONNECT_RESOLVED:
+CONNECT_RESOLVED:
case CONNECT_RESOLVED: {
struct Curl_addrinfo *hp = NULL;
/*
return CURLPX_RESOLVE_HOST;
}
/* FALLTHROUGH */
- CONNECT_REQ_INIT:
+CONNECT_REQ_INIT:
case CONNECT_REQ_INIT:
/*
* This is currently not supporting "Identification Protocol (RFC1413)".
return CURLPX_OK;
}
/* FALLTHROUGH */
- CONNECT_SOCKS_READ_INIT:
+CONNECT_SOCKS_READ_INIT:
case CONNECT_SOCKS_READ_INIT:
sx->outstanding = 2; /* expect two bytes */
sx->outp = socksreq; /* store it here */
default: /* do nothing! */
break;
- CONNECT_AUTH_INIT:
+CONNECT_AUTH_INIT:
case CONNECT_AUTH_INIT: {
/* Needs user name and password */
size_t proxy_user_len, proxy_password_len;
/* Everything is good so far, user was authenticated! */
sxstate(sx, data, CONNECT_REQ_INIT);
/* FALLTHROUGH */
- CONNECT_REQ_INIT:
+CONNECT_REQ_INIT:
case CONNECT_REQ_INIT:
if(socks5_resolve_local) {
enum resolve_t rc = Curl_resolv(data, sx->hostname, sx->remote_port,
}
}
/* FALLTHROUGH */
- CONNECT_RESOLVED:
+CONNECT_RESOLVED:
case CONNECT_RESOLVED: {
struct Curl_addrinfo *hp = NULL;
size_t destlen;
Curl_resolv_unlock(data, dns); /* not used anymore from now on */
goto CONNECT_REQ_SEND;
}
- CONNECT_RESOLVE_REMOTE:
+CONNECT_RESOLVE_REMOTE:
case CONNECT_RESOLVE_REMOTE:
/* Authentication is complete, now specify destination to the proxy */
len = 0;
}
/* FALLTHROUGH */
- CONNECT_REQ_SEND:
+CONNECT_REQ_SEND:
case CONNECT_REQ_SEND:
/* PORT MSB */
socksreq[len++] = (unsigned char)((sx->remote_port >> 8) & 0xff);
break;
case CURL_TS_IAC:
- process_iac:
+process_iac:
DEBUGASSERT(startwrite < 0);
switch(c) {
case CURL_WILL:
conn->gssapi_delegation = data->set.gssapi_delegation;
return conn;
- error:
+error:
free(conn->localdev);
free(conn);
}
#endif
- error:
+error:
free(proxyuser);
free(proxypasswd);
free(host);
*port_result = port;
- error:
+error:
free(host_dup);
return result;
}
*offset = ptr - login;
return CURLUE_OK;
- out:
+out:
free(userp);
free(passwdp);
u->host = Curl_dyn_ptr(&host);
return result;
- fail:
+fail:
Curl_dyn_free(&host);
free_urlhandle(u);
return result;
u->portnum = in->portnum;
}
return u;
- fail:
+fail:
curl_url_cleanup(u);
return NULL;
}
free(*storep);
*storep = Curl_dyn_ptr(&enc);
return CURLUE_OK;
- nomem:
+nomem:
free((char *)newp);
return CURLUE_OUT_OF_MEMORY;
}
}
return CURLE_OK;
- fail:
+fail:
return result;
}
state(data, SSH_SFTP_INIT);
return wssh_multi_statemach(data, done);
- error:
+error:
wolfSSH_free(sshc->ssh_session);
wolfSSH_CTX_free(sshc->ctx);
return CURLE_FAILED_INIT;
result = Curl_pin_peer_pubkey(data,
pinnedpubkey,
&pubkey[PUB_DER_MAX_BYTES - size], size);
- pinnedpubkey_error:
+pinnedpubkey_error:
mbedtls_x509_crt_free(p);
free(p);
free(pubkey);
}
cert_done = 1;
- fail:
+fail:
EVP_PKEY_free(pri);
X509_free(x509);
sk_X509_pop_free(ca, X509_free);
}
*curlcode = CURLE_OK;
- out:
+out:
return (ssize_t)rc; /* number of bytes */
}
}
}
- out:
+out:
return nread;
}
"schannel: decrypted data buffer: offset %zu length %zu",
backend->decdata_offset, backend->decdata_length));
- cleanup:
+cleanup:
/* Warning- there is no guarantee the encdata state is valid at this point */
DEBUGF(infof(data, "schannel: schannel_recv cleanup"));
DEBUGASSERT(backend);
- again:
+again:
*curlcode = CURLE_OK;
err = SSLRead(backend->ssl_ctx, buf, buffersize, &processed);
'INCLUDEDUP', => 'same file is included again',
'INDENTATION' => 'wrong start column for code',
'LONGLINE' => "Line longer than $max_column",
+ 'SPACEBEFORELABEL' => 'labels not at the start of the line',
'MULTISPACE' => 'multiple spaces used when not suitable',
'NOSPACEEQUALS' => 'equals sign without preceding space',
'NOTEQUALSZERO', => 'if/while comparison with != 0',
$line, length($1), $file, $ol, "no space before colon of switch label");
}
+ if($prevl !~ /\?\z/ && $l =~ /^ +([A-Za-z_][A-Za-z0-9_]*):$/ && $1 ne 'default') {
+ checkwarn("SPACEBEFORELABEL",
+ $line, length($1), $file, $ol, "no space before label");
+ }
+
# scan for use of banned functions
if($l =~ /^(.*\W)
(gmtime|localtime|
goto fail;
}
err = 0;
- fail:
+fail:
Curl_safefree(contents);
curl_slist_free_all(headers);
return err;
return CURLE_OK;
}
} /* if retry_numretries */
- noretry:
+noretry:
if((global->progressmode == CURL_PROGRESS_BAR) &&
per->progressbar.calls)
/* nothing to do */
result = CURLE_OK;
}
- fail:
+fail:
curl_url_cleanup(uh);
curl_free(path);
return result;
if(ret)
warnf(config, "option %s returned error (%d)\n", name, (int)ret);
#endif
- nomem:
+nomem:
return ret;
}
CODE2("%s%ldL);", preamble, rest);
}
- nomem:
+nomem:
return ret;
}
CODE2("%s%luUL);", preamble, rest);
}
- nomem:
+nomem:
return ret;
}
*slistno, *slistno, escaped);
}
- nomem:
+nomem:
Curl_safefree(escaped);
return ret;
}
CODE2("curl_easy_setopt(hnd, %s, slist%d);", name, i);
}
- nomem:
+nomem:
return ret;
}
}
}
- nomem:
+nomem:
Curl_safefree(escaped);
return ret;
}
}
}
- fail:
+fail:
*posp += (pattern - *patternp);
if(!endp || !step_n ||
return nurl;
}
- error:
+error:
curl_url_cleanup(u);
return NULL;
}
}
return 0;
- test_cleanup:
+test_cleanup:
return 1;
}
printf("%d\n", status);
return status;
- test_cleanup:
+test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
else {
printf("curl_easy_perform() failed. e = %d\n", code);
}
- test_cleanup:
+test_cleanup:
curl_slist_free_all(pHeaderList);
curl_easy_cleanup(curl);
curl_global_cleanup();
printf("Tested %u strings\n", i);
res = (int)result;
- test_cleanup:
+test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
curl_easy_setopt(ch, CURLOPT_COOKIEFILE, libtest_arg2);
curl_easy_perform(ch);
- cleanup:
+cleanup:
curl_easy_cleanup(ch);
curl_global_cleanup();
curl_easy_setopt(ch, CURLOPT_SHARE, NULL);
curl_multi_remove_handle(cm, ch);
- cleanup:
+cleanup:
curl_easy_cleanup(ch);
curl_share_cleanup(sh);
curl_multi_cleanup(cm);
res = curl_easy_perform(curl);
- test_cleanup:
+test_cleanup:
curl_easy_cleanup(curl);
curl_global_cleanup();
}
curl_multi_remove_handle(mcurl, curl);
- fail:
+fail:
curl_easy_cleanup(curl);
curl_multi_cleanup(mcurl);
}
} while(1);
- end:
+end:
if(buffer)
free(buffer);
if(dump)
if(num > 20)
num = 20;
- retry:
+retry:
written = swrite(sock, buffer, num);
if(written < 0) {
if((EWOULDBLOCK == SOCKERRNO) || (EAGAIN == SOCKERRNO)) {
putc(c, file); */
if(1 != write(test->ofile, &c, 1))
break;
- skipit:
+skipit:
prevchar = c;
}
return count;
wait_ms(1000*test->writedelay);
}
- send_data:
+send_data:
logmsg("write");
if(swrite(peer, sdp, size + 4) != size + 4) {
logmsg("write: fail");
continue;
}
}
- error:
+error:
curl_easy_cleanup(easy);
curl_multi_cleanup(multi);
curl_slist_free_all(list);
}
}
goto unit_test_abort;
- error:
+error:
curl_easy_cleanup(easy);
curl_multi_cleanup(multi);
curl_slist_free_all(list);
goto fail;
ret = parse_port(u, ipv6port, FALSE);
fail_unless(ret == CURLUE_BAD_PORT_NUMBER, "parse_port did wrong");
- fail:
+fail:
free(ipv6port);
curl_url_cleanup(u);
Curl_altsvc_save(curl, asi, outname);
curl_easy_cleanup(curl);
- fail:
+fail:
Curl_altsvc_cleanup(&asi);
}
#endif