Fixed all valgrind's complains
This commit is contained in:
parent
fdf5264e18
commit
0987a4cfa3
2 changed files with 6 additions and 1 deletions
clainsafecli
|
@ -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':
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue