mirror of
https://github.com/curl/curl.git
synced 2026-08-25 01:33:31 +03:00
parent
cb307544ad
commit
1b8f4dba28
16 changed files with 22 additions and 32 deletions
|
|
@ -576,13 +576,12 @@ CURLcode curl_easy_getinfo_ccsid(CURL *curl, CURLINFO info, ...)
|
|||
case CURLINFO_CERTINFO:
|
||||
cipf = *(struct curl_certinfo **)paramp;
|
||||
if(cipf) {
|
||||
cipt = (struct curl_certinfo *)malloc(sizeof(*cipt));
|
||||
cipt = malloc(sizeof(*cipt));
|
||||
if(!cipt)
|
||||
result = CURLE_OUT_OF_MEMORY;
|
||||
else {
|
||||
cipt->certinfo =
|
||||
(struct curl_slist **)calloc(cipf->num_of_certs + 1,
|
||||
sizeof(struct curl_slist *));
|
||||
cipt->certinfo = calloc(cipf->num_of_certs + 1,
|
||||
sizeof(struct curl_slist *));
|
||||
if(!cipt->certinfo)
|
||||
result = CURLE_OUT_OF_MEMORY;
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ int main(int argsc, struct arguments *args)
|
|||
|
||||
if(!exitcode) {
|
||||
/* Allocate space for parsed arguments. */
|
||||
argv = (char **)malloc((argc + 1) * sizeof(*argv) + argsize);
|
||||
argv = malloc((argc + 1) * sizeof(*argv) + argsize);
|
||||
if(!argv) {
|
||||
fputs("Memory allocation error\n", stderr);
|
||||
exitcode = -2;
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
|
||||
/* Allocate memory for the ASCII arguments and vector. */
|
||||
argv = (char **)malloc((argc + 1) * sizeof(*argv) + bytecount);
|
||||
argv = malloc((argc + 1) * sizeof(*argv) + bytecount);
|
||||
|
||||
/* Build the vector and convert argument encoding. */
|
||||
outbuf = (char *)(argv + argc + 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue