GNOME Bugzilla – Bug 765355
Two more leaks of struct addrinfo in xmlNanoFTPConnect() for error condition in IPv6 support
Last modified: 2017-11-13 14:55:57 UTC
There are two more leaks in xmlNanoFTPConnect() after Bug 732352 was fixed: <https://git.gnome.org/browse/libxml2/tree/nanoftp.c#n880> if (proxy) { if (getaddrinfo (proxy, NULL, &hints, &result) != 0) { __xmlIOErr(XML_FROM_FTP, 0, "getaddrinfo failed"); // Leak of result here if set. return (-1); } } else if (getaddrinfo (ctxt->hostname, NULL, &hints, &result) != 0) { __xmlIOErr(XML_FROM_FTP, 0, "getaddrinfo failed"); // Leak of result here if set. return (-1); }
If the result is non-zero, `getaddrinfo` failed and no `struct addrinfo` is returned in `result`.