Import of pkgsrc-2015Q3

This commit is contained in:
2015-10-03 03:37:01 -07:00
committed by Lionel Sambuc
parent f641581404
commit 9d819b6d54
7578 changed files with 228314 additions and 80018 deletions

View File

@@ -0,0 +1,29 @@
$NetBSD: patch-src_socket.c,v 1.3 2015/07/04 15:52:51 bsiegert Exp $
Prevent mbsync from crashing, PR pkg/49784.
--- src/socket.c.orig 2015-07-04 15:47:16.000000000 +0000
+++ src/socket.c
@@ -477,7 +477,10 @@ static void
socket_connected( conn_t *conn )
{
#ifdef HAVE_IPV6
- freeaddrinfo( conn->addrs );
+ if ( conn->addrs ) {
+ freeaddrinfo( conn->addrs );
+ conn->addrs = NULL;
+ }
#endif
conf_fd( conn->fd, 0, POLLIN );
conn->state = SCK_READY;
@@ -488,7 +491,10 @@ static void
socket_connect_bail( conn_t *conn )
{
#ifdef HAVE_IPV6
- freeaddrinfo( conn->addrs );
+ if ( conn->addrs ) {
+ freeaddrinfo( conn->addrs );
+ conn->addrs = NULL;
+ }
#endif
free( conn->name );
conn->name = 0;