GNOME Bugzilla – Bug 732352
Leak of struct addrinfo in xmlNanoFTPConnect() for error condition in IPv6 support
Last modified: 2016-04-21 02:03:06 UTC
The early return here doesn't call freeaddrinfo(result), thus leaking memory: if (tmp->ai_addrlen > sizeof(ctxt->ftpAddr)) { __xmlIOErr(XML_FROM_FTP, 0, "gethostbyname address mismatch"); return (-1); } <https://git.gnome.org/browse/libxml2/tree/nanoftp.c#n910>
Correct, it is a bug. Attaching the patch. Please commit.
Created attachment 287121 [details] [review] Fix the reported leaking resource in nanoftp.c
Ack similar to the way it's handled a few lines above, thanks to both, patch pushed on git ! Daniel
Fixed in d72cb06de95a100058315bc0c3359d7c46583113: <https://git.gnome.org/browse/libxml2/commit/?id=d72cb06de95a100058315bc0c3359d7c46583113> Thanks!