mdnsresponder: fix fd leak for IPv6 sockets
authorMarkus Stenberg <markus.stenberg@iki.fi>
Mon, 14 Sep 2015 11:51:06 +0000 (14:51 +0300)
committerSteven Barth <steven@midlink.org>
Mon, 14 Sep 2015 12:06:53 +0000 (14:06 +0200)
Signed-off-by: Steven Barth <steven@midlink.org>
net/mdnsresponder/Makefile
net/mdnsresponder/patches/100-linux_fixes.patch

index 5eaedd2ec53c11db8327f382bf90b35cb24f0f4c..cfc552701bdc6d6afe42592127425edb01516d9b 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mDNSResponder
 PKG_VERSION:=567
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=mDNSResponder-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://opensource.apple.com/tarballs/mDNSResponder/
index 02940cf2fd6a17ec5f1f83321750df5398318b15..df56608d5bc93a094144661af3e9e7ee184811a8 100644 (file)
@@ -313,7 +313,7 @@ index 6effa12..7c1d6eb 100755
  }
  
 diff --git a/mDNSPosix/mDNSUNP.c b/mDNSPosix/mDNSUNP.c
-index b392fc7..fe800af 100755
+index b392fc7..f551ad5 100755
 --- a/mDNSPosix/mDNSUNP.c
 +++ b/mDNSPosix/mDNSUNP.c
 @@ -63,6 +63,7 @@
@@ -357,9 +357,12 @@ index b392fc7..fe800af 100755
              myflags = 0;
              if (strncmp(lastname, ifname, IFNAMSIZ) == 0) {
                  if (doaliases == 0)
-@@ -205,7 +208,8 @@ gotError:
+@@ -204,8 +207,11 @@ gotError:
+         res0=NULL;
      }
  done:
++    if (fp)
++      fclose(fp);
      if (sockfd != -1) {
 -        assert(close(sockfd) == 0);
 +      int rv = close(sockfd);