diff options
author | Gaurav Gupta <g.gupta@samsung.com> | 2014-10-06 19:28:29 +0800 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2014-10-06 19:28:29 +0800 |
commit | d72cb06de95a100058315bc0c3359d7c46583113 (patch) | |
tree | 6b62b1658147eb110236324f552e81129c8fed58 | |
parent | 292a9f293decfcd1de8870d93866bf450f3f555f (diff) | |
download | libxml2-d72cb06de95a100058315bc0c3359d7c46583113.tar.gz |
Leak of struct addrinfo in xmlNanoFTPConnect()
For https://bugzilla.gnome.org/show_bug.cgi?id=732352
in case of error condition in IPv6 support, the early return here
doesn't call freeaddrinfo(result), thus leaking memory.
-rw-r--r-- | nanoftp.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -908,6 +908,8 @@ xmlNanoFTPConnect(void *ctx) { return (-1); } if (tmp->ai_addrlen > sizeof(ctxt->ftpAddr)) { + if (result) + freeaddrinfo (result); __xmlIOErr(XML_FROM_FTP, 0, "gethostbyname address mismatch"); return (-1); } |