network: Add NULL check
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Wed, 24 Aug 2011 14:02:06 +0000 (17:02 +0300)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 12 Sep 2011 09:40:47 +0000 (11:40 +0200)
src/network.c

index 5fdc43c..ffbf220 100644 (file)
@@ -1332,6 +1332,9 @@ int __connman_network_set_ipconfig(struct connman_network *network,
        enum connman_ipconfig_method method;
        int ret;
 
+       if (network == NULL)
+               return -EINVAL;
+
        if (ipconfig_ipv6) {
                method = __connman_ipconfig_get_method(ipconfig_ipv6);