Fixed all valgrind's complains
This commit is contained in:
parent
fdf5264e18
commit
0987a4cfa3
2 changed files with 6 additions and 1 deletions
|
@ -39,6 +39,8 @@ main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
if(argc == optind) {
|
if(argc == optind) {
|
||||||
print_usage();
|
print_usage();
|
||||||
|
free(buffer);
|
||||||
|
curl_easy_cleanup(easy_handle);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,6 +68,8 @@ main(int argc, char **argv)
|
||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
print_help();
|
print_help();
|
||||||
|
free(buffer);
|
||||||
|
curl_easy_cleanup(easy_handle);
|
||||||
return 0;
|
return 0;
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
|
@ -175,7 +179,7 @@ main(int argc, char **argv)
|
||||||
if(!silent_flag)
|
if(!silent_flag)
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
|
|
||||||
printf("%s",buffer);
|
printf("%s", buffer);
|
||||||
}
|
}
|
||||||
curl_formfree(post);
|
curl_formfree(post);
|
||||||
curl_easy_cleanup(easy_handle);
|
curl_easy_cleanup(easy_handle);
|
||||||
|
|
|
@ -29,6 +29,7 @@ store_link(const char *path, const char *buf)
|
||||||
}
|
}
|
||||||
fwrite(buf,strlen(buf),1,fp);
|
fwrite(buf,strlen(buf),1,fp);
|
||||||
fputc('\n',fp);
|
fputc('\n',fp);
|
||||||
|
fclose(fp);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue