ipconfig: Check for ipconfig pointer before getting ops_data
authorSamuel Ortiz <sameo@linux.intel.com>
Wed, 22 Dec 2010 15:37:16 +0000 (16:37 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Wed, 22 Dec 2010 15:37:16 +0000 (16:37 +0100)
src/ipconfig.c

index 0518e10..57e3218 100644 (file)
@@ -953,6 +953,9 @@ void connman_ipconfig_unref(struct connman_ipconfig *ipconfig)
  */
 void *connman_ipconfig_get_data(struct connman_ipconfig *ipconfig)
 {
+       if (ipconfig == NULL)
+               return NULL;
+
        return ipconfig->ops_data;
 }