Check if malloc() was succesful

This commit is contained in:
qorg11 2021-02-03 17:39:34 +01:00
parent 509c6e9c68
commit 4535b267a9
No known key found for this signature in database
GPG Key ID: 343FC20A4ACA62B9
1 changed files with 3 additions and 0 deletions

View File

@ -39,6 +39,9 @@ main(int argc, char **argv)
tor_flag = i2p_flag = 0;
char *buffer = (char *)calloc(1024,sizeof(char));
if(buffer == NULL) {
fprintf(stderr,"Error allocating memory!\n");
}
char server[256] = "https://lainsafe.kalli.st";
CURL *easy_handle = curl_easy_init();