ipconfig: Fix IPv6 config reference count initialization
authorSamuel Ortiz <sameo@linux.intel.com>
Fri, 17 Dec 2010 14:21:27 +0000 (15:21 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 17 Dec 2010 14:21:27 +0000 (15:21 +0100)
It should be set to 1 when created.

src/ipconfig.c

index 3c0579d..527ca5f 100644 (file)
@@ -848,6 +848,8 @@ static struct connman_ipconfig *create_ipv6config(int index)
        if (ipv6config == NULL)
                return NULL;
 
+       ipv6config->refcount = 1;
+
        ipv6config->index = index;
        ipv6config->type = CONNMAN_IPCONFIG_TYPE_IPV6;
        ipv6config->method = CONNMAN_IPCONFIG_METHOD_OFF;