svn commit: [26179] trunk/busybox/networking
vda at busybox.net
vda at busybox.net
Tue Apr 21 23:51:44 UTC 2009
Author: vda
Date: 2009-04-21 23:51:43 +0000 (Tue, 21 Apr 2009)
New Revision: 26179
Log:
nc: free lsa in server mode, we might be up for a long time
Modified:
trunk/busybox/networking/nc.c
Changeset:
Modified: trunk/busybox/networking/nc.c
===================================================================
--- trunk/busybox/networking/nc.c 2009-04-21 23:48:38 UTC (rev 26178)
+++ trunk/busybox/networking/nc.c 2009-04-21 23:51:43 UTC (rev 26179)
@@ -111,12 +111,12 @@
/* If we didn't specify a port number,
* query and print it after listen() */
if (!lport) {
- socklen_t addrlen = lsa->len;
- getsockname(sfd, &lsa->u.sa, &addrlen);
+ getsockname(sfd, &lsa->u.sa, &lsa->len);
lport = get_nport(&lsa->u.sa);
fdprintf(2, "%d\n", ntohs(lport));
}
close_on_exec_on(sfd);
+ free(lsa);
accept_again:
cfd = accept(sfd, NULL, 0);
if (cfd < 0)
More information about the busybox-cvs
mailing list