You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2001/03/31 20:58:17 UTC
cvs commit: apr/network_io/win32 sockets.c
trawick 01/03/31 10:58:17
Modified: network_io/win32 sockets.c
Log:
When allocating local and remote sockaddrs with a new socket,
make sure to fill out the pool field in them. Otherwise,
certain operations can segfault.
Revision Changes Path
1.52 +2 -0 apr/network_io/win32/sockets.c
Index: sockets.c
===================================================================
RCS file: /home/cvs/apr/network_io/win32/sockets.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- sockets.c 2001/02/16 04:16:04 1.51
+++ sockets.c 2001/03/31 18:58:16 1.52
@@ -108,8 +108,10 @@
(*new)->cntxt = p;
(*new)->local_addr = (apr_sockaddr_t *)apr_pcalloc((*new)->cntxt,
sizeof(apr_sockaddr_t));
+ (*new)->local_addr->pool = p;
(*new)->remote_addr = (apr_sockaddr_t *)apr_pcalloc((*new)->cntxt,
sizeof(apr_sockaddr_t));
+ (*new)->remote_addr->pool = p;
}
APR_DECLARE(apr_status_t) apr_socket_create(apr_socket_t **new, int ofamily,