Fixed all valgrind's complains

This commit is contained in:
qorg11 2022-02-09 15:23:52 +01:00
parent fdf5264e18
commit 0987a4cfa3
No known key found for this signature in database
GPG Key ID: 343FC20A4ACA62B9
2 changed files with 6 additions and 1 deletions

View File

@ -39,6 +39,8 @@ main(int argc, char **argv)
}
if(argc == optind) {
print_usage();
free(buffer);
curl_easy_cleanup(easy_handle);
return -1;
}
@ -66,6 +68,8 @@ main(int argc, char **argv)
break;
case 'h':
print_help();
free(buffer);
curl_easy_cleanup(easy_handle);
return 0;
break;
case 'p':
@ -175,7 +179,7 @@ main(int argc, char **argv)
if(!silent_flag)
putchar('\n');
printf("%s",buffer);
printf("%s", buffer);
}
curl_formfree(post);
curl_easy_cleanup(easy_handle);

View File

@ -29,6 +29,7 @@ store_link(const char *path, const char *buf)
}
fwrite(buf,strlen(buf),1,fp);
fputc('\n',fp);
fclose(fp);
return 0;
}