provider: NULL pointer check
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Wed, 24 Aug 2011 14:01:54 +0000 (17:01 +0300)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 12 Sep 2011 09:40:45 +0000 (11:40 +0200)
src/provider.c

index 9ae62cd..633ca40 100644 (file)
@@ -879,6 +879,9 @@ int connman_provider_append_route(struct connman_provider *provider,
 
 const char *connman_provider_get_driver_name(struct connman_provider *provider)
 {
+       if (provider->driver == NULL)
+               return NULL;
+
        return provider->driver->name;
 }