Re: [Bug-wget] [PATCH v2] bug #48811: netrc password wins over interactive --ask-password

2016-11-22 Thread Wajda, Piotr
Hi Tim, Just sent new version of this patch. Shouldn't be any memleaks now. Piotr On 21/10/16 12:36, Tim Rühsen wrote: Hi Piotr, please include netrc.h in utils.c. In getftp(): struct net_credentials *ftp_cred = malloc (sizeof *ftp_cred); ... ftp_cred = pick_credentials() This looks

Re: [Bug-wget] [PATCH v2] bug #48811: netrc password wins over interactive --ask-password

2016-10-21 Thread Tim Rühsen
Hi Piotr, please include netrc.h in utils.c. In getftp(): struct net_credentials *ftp_cred = malloc (sizeof *ftp_cred); ... ftp_cred = pick_credentials() This looks like a memleak. Also, where do you free ftp_cred ? Is it really necessary to allocate ftp_cred on each call to getftp (just

[Bug-wget] [PATCH v2] bug #48811: netrc password wins over interactive --ask-password

2016-10-19 Thread losgrandes
* src/ftp.c: Leverage new struct net_credentials and function pick_credentials. pick_credentials is responsible for taking proper order when selecting source of credentials. * src/http.c: Leverage new struct net_credentials and function pick_credentials. * src/utils.c: New function