add missing patch
This commit is contained in:
parent
ffa5f1c913
commit
87e84d5af2
@ -1,9 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.19 2011/09/17 18:08:03 jakob Exp $
|
||||
# $OpenBSD: Makefile,v 1.20 2011/09/17 19:00:22 jakob Exp $
|
||||
|
||||
COMMENT= DNS library modelled after Net::DNS
|
||||
|
||||
PKGNAME= libldns-${VERSION}
|
||||
REVISION= 0
|
||||
REVISION= 1
|
||||
|
||||
SHARED_LIBS += ldns 4.8
|
||||
|
||||
|
30
net/ldns/libldns/patches/patch-net_c
Normal file
30
net/ldns/libldns/patches/patch-net_c
Normal file
@ -0,0 +1,30 @@
|
||||
$OpenBSD: patch-net_c,v 1.1 2011/09/17 19:00:22 jakob Exp $
|
||||
|
||||
Fix socket leak on errors.
|
||||
|
||||
--- net.c.orig Thu Jul 14 16:11:57 2011
|
||||
+++ net.c Thu Jul 14 16:15:24 2011
|
||||
@@ -341,6 +341,11 @@ ldns_udp_bgsend(ldns_buffer *qbin, const struct sockad
|
||||
}
|
||||
|
||||
if (ldns_udp_send_query(qbin, sockfd, to, tolen) == 0) {
|
||||
+#ifndef USE_WINSOCK
|
||||
+ close(sockfd);
|
||||
+#else
|
||||
+ closesocket(sockfd);
|
||||
+#endif
|
||||
return 0;
|
||||
}
|
||||
return sockfd;
|
||||
@@ -678,6 +683,11 @@ ldns_tcp_bgsend(ldns_buffer *qbin, const struct sockad
|
||||
}
|
||||
|
||||
if (ldns_tcp_send_query(qbin, sockfd, to, tolen) == 0) {
|
||||
+#ifndef USE_WINSOCK
|
||||
+ close(sockfd);
|
||||
+#else
|
||||
+ closesocket(sockfd);
|
||||
+#endif
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user