summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-08-11 22:05:10 +0000
committerbrian <brian@FreeBSD.org>1997-08-11 22:05:10 +0000
commitab1e7a59961256f679b5cfba97b4cbf54aca7d47 (patch)
tree38dcb144aa54f36e7b5c9c5b1bc52fbe441308b0 /lib
parentd18cfb8af28db1574d9f392786def6fafd920c6a (diff)
downloadFreeBSD-src-ab1e7a59961256f679b5cfba97b4cbf54aca7d47.zip
FreeBSD-src-ab1e7a59961256f679b5cfba97b4cbf54aca7d47.tar.gz
Fix file descriptor leak.
Submitted by: Charles Mott <cmott@srv.net> Identified by: Gordon Burditt
Diffstat (limited to 'lib')
-rw-r--r--lib/libalias/HISTORY7
-rw-r--r--lib/libalias/Makefile2
-rw-r--r--lib/libalias/alias_db.c1
-rw-r--r--lib/libalias/libalias.33
4 files changed, 11 insertions, 2 deletions
diff --git a/lib/libalias/HISTORY b/lib/libalias/HISTORY
index 74bb31b..c690b58 100644
--- a/lib/libalias/HISTORY
+++ b/lib/libalias/HISTORY
@@ -103,3 +103,10 @@ Version 2.2: July, 1997 (cjm)
fragments which are never resolved after a timeout
period. Once a fragment is resolved, it becomes
the users responsibility to free the memory.
+
+Version 2.3: August 11, 1997 (cjm)
+ - Problem associated with socket file descriptor
+ accumulation in alias_db.c corrected. The sockets
+ had to be closed when a binding failed. Problem
+ identified by Gordon Burditt.
+
diff --git a/lib/libalias/Makefile b/lib/libalias/Makefile
index c4f74ba..d7eab42 100644
--- a/lib/libalias/Makefile
+++ b/lib/libalias/Makefile
@@ -1,6 +1,6 @@
LIB= alias
SHLIB_MAJOR= 2
-SHLIB_MINOR= 2
+SHLIB_MINOR= 3
CFLAGS+=-Wall -I${.CURDIR}
SRCS= alias.c alias_db.c alias_ftp.c alias_irc.c alias_util.c alias_old.c
MAN3=libalias.3
diff --git a/lib/libalias/alias_db.c b/lib/libalias/alias_db.c
index fa2befc..3579dca 100644
--- a/lib/libalias/alias_db.c
+++ b/lib/libalias/alias_db.c
@@ -616,6 +616,7 @@ GetSocket(u_short port_net, int *sockfd, int link_type)
}
else
{
+ close(sock);
return(0);
}
}
diff --git a/lib/libalias/libalias.3 b/lib/libalias/libalias.3
index 3950af9..e989d6e 100644
--- a/lib/libalias/libalias.3
+++ b/lib/libalias/libalias.3
@@ -568,7 +568,7 @@ of data including its checksum. If the checksum is
valid, PacketAliasInternetChecksum() will return zero.
.Sh 7. Authors
-Charles Mott (cmott@srv.net), versions 1.0 - 1.8, 2.0 - 2.2.
+Charles Mott (cmott@srv.net), versions 1.0 - 1.8, 2.0 - 2.3.
Eivind Eiklund (eivind@freebsd.org), versions 1.8b and 1.9.
Added IRC support as well as contributing a number of
@@ -591,6 +591,7 @@ valuable comments and/or debugging assistance.
.It Dave Remien
.It J. Fortes
.It Andrzej Bialeki
+.It Gordon Burditt
.El
.Sh Appendix: Conceptual Background
OpenPOWER on IntegriCloud