Loading ares/ares_init.c +2 −2 Original line number Diff line number Diff line Loading @@ -675,7 +675,7 @@ DhcpNameServer { if (bytes) { line = (char *)malloc(bytes+1); line = malloc(bytes+1); if (RegQueryValueEx(mykey, NAMESERVER, NULL, &data_type, (unsigned char *)line, &bytes) == ERROR_SUCCESS) Loading Loading @@ -952,7 +952,7 @@ static int init_by_defaults(ares_channel channel) size_t len = 64; int res; hostname = (char *)malloc(len); hostname = malloc(len); if(!hostname) { rc = ARES_ENOMEM; goto error; Loading ares/ares_parse_ptr_reply.c +1 −1 Original line number Diff line number Diff line Loading @@ -77,7 +77,7 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr, /* Examine each answer resource record (RR) in turn. */ hostname = NULL; aliases = (char **) malloc(8 * sizeof(char *)); aliases = malloc(8 * sizeof(char *)); if (!aliases) { free(ptrname); Loading docs/examples/curlx.c +3 −3 Original line number Diff line number Diff line Loading @@ -281,7 +281,7 @@ int main(int argc, char **argv) { struct curl_slist * headers=NULL; int badarg=0; binaryptr=(char*)malloc(tabLength); binaryptr = malloc(tabLength); p.verbose = 0; p.errorbio = BIO_new_fp (stderr, BIO_NOCLOSE); Loading Loading @@ -404,7 +404,7 @@ int main(int argc, char **argv) { /* determine URL to go */ if (hostporturl) { serverurl=(char*) malloc(9+strlen(hostporturl)); serverurl = malloc(9+strlen(hostporturl)); sprintf(serverurl,"https://%s",hostporturl); } else if (p.accesstype != 0) { /* see whether we can find an AIA or SIA for a given access type */ Loading Loading @@ -442,7 +442,7 @@ int main(int argc, char **argv) { /* pass our list of custom made headers */ contenttype=(char*) malloc(15+strlen(mimetype)); contenttype = malloc(15+strlen(mimetype)); sprintf(contenttype,"Content-type: %s",mimetype); headers = curl_slist_append(headers,contenttype); curl_easy_setopt(p.curl, CURLOPT_HTTPHEADER, headers); Loading docs/examples/fopen.c +1 −1 Original line number Diff line number Diff line Loading @@ -221,7 +221,7 @@ url_fopen(const char *url,const char *operation) URL_FILE *file; (void)operation; file = (URL_FILE *)malloc(sizeof(URL_FILE)); file = malloc(sizeof(URL_FILE)); if(!file) return NULL; Loading docs/examples/opensslthreadlock.c +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ int thread_setup(void) { int i; mutex_buf = (MUTEX_TYPE *)malloc(CRYPTO_num_locks( ) * sizeof(MUTEX_TYPE)); mutex_buf = malloc(CRYPTO_num_locks( ) * sizeof(MUTEX_TYPE)); if (!mutex_buf) return 0; for (i = 0; i < CRYPTO_num_locks( ); i++) Loading Loading
ares/ares_init.c +2 −2 Original line number Diff line number Diff line Loading @@ -675,7 +675,7 @@ DhcpNameServer { if (bytes) { line = (char *)malloc(bytes+1); line = malloc(bytes+1); if (RegQueryValueEx(mykey, NAMESERVER, NULL, &data_type, (unsigned char *)line, &bytes) == ERROR_SUCCESS) Loading Loading @@ -952,7 +952,7 @@ static int init_by_defaults(ares_channel channel) size_t len = 64; int res; hostname = (char *)malloc(len); hostname = malloc(len); if(!hostname) { rc = ARES_ENOMEM; goto error; Loading
ares/ares_parse_ptr_reply.c +1 −1 Original line number Diff line number Diff line Loading @@ -77,7 +77,7 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr, /* Examine each answer resource record (RR) in turn. */ hostname = NULL; aliases = (char **) malloc(8 * sizeof(char *)); aliases = malloc(8 * sizeof(char *)); if (!aliases) { free(ptrname); Loading
docs/examples/curlx.c +3 −3 Original line number Diff line number Diff line Loading @@ -281,7 +281,7 @@ int main(int argc, char **argv) { struct curl_slist * headers=NULL; int badarg=0; binaryptr=(char*)malloc(tabLength); binaryptr = malloc(tabLength); p.verbose = 0; p.errorbio = BIO_new_fp (stderr, BIO_NOCLOSE); Loading Loading @@ -404,7 +404,7 @@ int main(int argc, char **argv) { /* determine URL to go */ if (hostporturl) { serverurl=(char*) malloc(9+strlen(hostporturl)); serverurl = malloc(9+strlen(hostporturl)); sprintf(serverurl,"https://%s",hostporturl); } else if (p.accesstype != 0) { /* see whether we can find an AIA or SIA for a given access type */ Loading Loading @@ -442,7 +442,7 @@ int main(int argc, char **argv) { /* pass our list of custom made headers */ contenttype=(char*) malloc(15+strlen(mimetype)); contenttype = malloc(15+strlen(mimetype)); sprintf(contenttype,"Content-type: %s",mimetype); headers = curl_slist_append(headers,contenttype); curl_easy_setopt(p.curl, CURLOPT_HTTPHEADER, headers); Loading
docs/examples/fopen.c +1 −1 Original line number Diff line number Diff line Loading @@ -221,7 +221,7 @@ url_fopen(const char *url,const char *operation) URL_FILE *file; (void)operation; file = (URL_FILE *)malloc(sizeof(URL_FILE)); file = malloc(sizeof(URL_FILE)); if(!file) return NULL; Loading
docs/examples/opensslthreadlock.c +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ int thread_setup(void) { int i; mutex_buf = (MUTEX_TYPE *)malloc(CRYPTO_num_locks( ) * sizeof(MUTEX_TYPE)); mutex_buf = malloc(CRYPTO_num_locks( ) * sizeof(MUTEX_TYPE)); if (!mutex_buf) return 0; for (i = 0; i < CRYPTO_num_locks( ); i++) Loading