# HG changeset patch
# User John Calcote <john.calcote@gmail.com>
# Date 1491599819 21600
#      Fri Apr 07 15:16:59 2017 -0600
# Node ID 2a2554a6550270bc586811b2ce1f73d104cae6f1
# Parent  b04612a6f65ae48d4f4b1b351caa429eab326b91
BUG#108: Properly initialize xcastsocks for error exit.

diff -r b04612a6f65a -r 2a2554a65502 libslp/libslp_network.c
--- a/libslp/libslp_network.c	Fri Apr 07 15:08:02 2017 -0600
+++ b/libslp/libslp_network.c	Fri Apr 07 15:16:59 2017 -0600
@@ -983,6 +983,7 @@
    v6outifaceinfo.bcast_addr = NULL;
    xcastsocks.sock = NULL;
    xcastsocks.peeraddr = NULL;
+   xcastsocks.sock_count = 0;
 
    xid = SLPXidGenerate();
    mtu = getmtu();
@@ -1034,7 +1035,6 @@
       result = SLP_MEMORY_ALLOC_FAILED;
       goto FINISHED;
    }
-   xcastsocks.sock_count = 0;
    xcastsocks.sock = malloc(slp_max_ifaces * sizeof(sockfd_t));
    if (xcastsocks.sock == NULL)
    {
